ZF-11328: Cloning of Zend_Pdf_Pages does not work as described in documentation and as expected

Issue Type: Bug Created: 2011-04-27T07:13:31.000+0000 Last Updated: 2011-04-27T07:13:31.000+0000 Status: Open Fix version(s): Reporter: Simon Daniel Flottmann (sdf1981cgn) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Pdf

Related issues: Attachments:


Cloning a PDF page does not work as expected or documented. When trying to make a working example out of […] it throws an exception Uncaught exception 'Zend_Pdf_Exception' with message 'Font has not been set' event if the original page has a font set which should be cloned, too.

<pre class="highlight">
$templatePageIndex = 'template';
$pdf = new Zend_Pdf();
$page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4_LANDSCAPE);
$page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 11);
$pdf->pages[$templatePageIndex] = $page;
$template = $pdf->pages[$templatePageIndex];
$page1 = new Zend_Pdf_Page($template);
$page1->drawText('Some text...', 10, 10);


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.