Solved

line breaks in pdf

Posted on 2004-09-29
6
3,768 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
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…

726 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