Solved

PDFlib line feeds in block of text?

Posted on 2001-07-11
6
212 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

856 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