![]() |
PDF Creation - Help!
I am using the following PHP PDF class: http://www.ros.co.nz/pdf/
However, I am having the following problem: I can't have a long paragraph without the text just continueing on the same line off the page. This is my code: PHP Code:
Looking forward to help and suggestions! |
If you use the Ezpdf class, there is a method called ezText which will take care of wrapping long strings (over multiple pages if needs be). All the relevant information can be found in the readme.pdf document included in the download on the site that you linked to.
|
I have tried that before... :(
PHP Code:
|
I am not sure how either of these programs work but you could always add the line breaks in yourself with a wordwrap?
Like: $newtext = wordwrap($text, 8, "\n"); Where 8 is the limit per line and \n is your delimiter. PHP Code:
|
Well, that works a bit - however, the following text is on the same line so you have multiple layers ontop of each other. :(
|
2 Attachment(s)
Cezpdf seems to wrap the text just fine for me. I just tried it with a block of 'lorem ipsum' text which wraps nicely, even over multiple pages if there's enough text. See the attachments for my code, the sample text isn't as big as I'd hoped for (insanely small file size limits for attachments) but it gets the idea across.![]() |
Damn, I tried your example too Salathe and still the same. Must be my host! :(
http://www.imgloader.com/uploads/lipsum.jpg |
Looks like something went wrong when I was uploading the fonts, problem solved.Thanks guys!
|
| All times are GMT. The time now is 06:14 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0