Solved

line breaks in pdf

Posted on 2004-09-29
6
3,782 Views
Last Modified: 2011-07-08
is there any specific tag for line breaks in pdf suchs as <br> in html
0
Comment
Question by:sandeepaher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 12179645
Depends ...

Where (and why) do you want to create a line break? Is it in a form field, or "real" PDF content?
0
 

Author Comment

by:sandeepaher
ID: 12179706
actuallly i am using a php library called EzPdf to create PDF documents. so when i supply some text from a TEXTAREA field the function which i use to out put  text "addTextWrap($text)" does not maintain the line breaks formatting.
so i was thinking of replacing "\n" in $text with the pdf tag for line break.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 12179796
OK, you are talking about PDF content. There is no line break in PDF. A line break is simulated by advancing the cursor's vertical position by the line distance. If you read the PDF spec, you will notice that  there are not even lines in a PDF file: All text is organized in "text runs". A text run can be one character, one word, part of one word, a collection of words, ... There is no requirement that a text run is one line either. How text is actually organized depends on the program you use to create the PDF content - in your case this would be EzPdf, something I'm not familiar with (not yet :-). So, you need to look in the EzPdf documentation for information about how to force a line break. There is nothing that you can put into the PDF content (that is, if the EzPdf environment is not filtering the string and forcing the text to a new line behind the scenes) that would be interpreted as a line break by Acrobat.

What if you put your individual lines (or paragraphs) into separate addTextWrap() calls?
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 12179964
I took a brief look at the EzPdf package, and it looks like you can insert line breaks if you use the ezText() function. But again: This is not something that actually ends up in the PDF file, the ezText() function will parse the text and break it up into lines.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Getting information about Fonts being used in a PDF file A colleague of mine recently faced an issue related to the PDF file format. The PDFs were containing mission critical client information, they were successfully mailed but there was a sm…
This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question