Solved

PDFlib line feeds in block of text?

Posted on 2001-07-11
6
210 Views
Last Modified: 2012-05-04
I'm using PDFlib 3.03 under PHP 4.0.6 on linux.  I can generate pdf documents find but when I have a block of text with new lines and carridge returns acrobat ignores them and all lines are printed on one line right off the page.

Does anyone know how to get pdflib to provide new lines for \n in blocks of text?

Thanks.
0
Comment
Question by:scottg
  • 2
  • 2
  • 2
6 Comments
 

Expert Comment

by:cynicz
ID: 6342656
Hi there,

I'm not familiar with PDFlib, but this is what I found in the manual:

http://www.php.net:8000/manual/en/html/function.pdf-continue-text.html

looks like you you have to break the text into an array on newlines,

print the first line with

http://www.php.net:8000/manual/en/html/function.pdf-show-xy.html

and then continue with

http://www.php.net:8000/manual/en/html/function.pdf-stringwidth.html

don't forget to check whether the lines fit into the page:

http://www.php.net:8000/manual/en/html/function.pdf-stringwidth.html
0
 

Author Comment

by:scottg
ID: 6342694
I know that might be possible, I'm trying to avoid that.  I was hoping there might be a normal way of doing things.
0
 

Expert Comment

by:cynicz
ID: 6342719
Well, if there's nothing else in the manual, then that's most probably all you have.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:Moondancer
ID: 6419286
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:

1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.

2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

3.  Ask Community Support to help split points between participating experts.  Just comment here with details.

4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.

If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.

PLEASE DO NOT AWARD THE POINTS TO ME.

____________________________________________



Hi Experts:

In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.

Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.

Thank you everyone.

Moondancer :)
Community Support Moderator @ Experts Exchange

P.S.  REGARDING POINTS, Guidelines and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 

Author Comment

by:scottg
ID: 6420129
The answer didn't acomplish what I was after.  Besides I upgraded to pdflib 4 anyway since then.
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 6445705
Points refunded, moving as Zero Points Q to PAQ.
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

910 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now