?
Solved

line breaks in pdf

Posted on 2004-09-29
6
Medium Priority
?
3,796 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
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…

752 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