Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.8.4
-
Fix Version/s: None
-
Component/s: Zend_Pdf
-
Labels:None
Description
Hi,
currently Zend_Pdf_Page::drawText() renders provided text within single line, whether provided text is multi-line or not.
It would be great if it could handle multi-line text natively.
I quickly implemented it trhough by subclassing drawText() method with following code:
foreach (explode(PHP_EOL, $text) as $i => $line) {
$page->drawText($line, $x, $y - $i * $page->getFontSize(), $encoding);
}
We could go further and increase flexibility by adding a line-height property on Zend_Pdf_Page and use this value as a line height to center text too.
Regards,
Remy
Issue Links
| This issue duplicates: | ||||
| ZF-1254 | Improve Zend_Pdf Text-Functions |
|
|
|
I think multi-line issues are handled in another bug quite extensively