On Sep 24, 2006, at 3:12 AM, Asger Hallas wrote:
I’m having problems placing linefeeds in text using Zend_Pdf… can anybody tell me how use drawText to draw a text that breaks on \n or something similar?
Zend_Pdf_Page::drawText() is a primitive drawing operator that simply draws straight lines of text on the page at a given coordinate. At this point in the framework's development, it is your responsibility to calculate your own line fragments and feed those fragments to drawText(). One approach would be to split the text on \n, perhaps using the PHP explode() function, and then draw each of the resulting fragments individually.
Helper classes to handle layout rectangles (which will wrap long lines, break at paragraphs, etc.) are planned for a future revision. Watch http://framework.zend.com/wiki/display/ZFDEV/Zend_Pdf and http://framework.zend.com/wiki/display/ZFDEV/MFS+Team+%28Mail%2C +Formats%2C+Search%29 for more information.
-- Willie Alberty, Owner Spenlen Media [EMAIL PROTECTED] http://www.spenlen.com/
