ZF-12340: Zend_Pdf_Canvas is not fully implemented

Issue Type: Bug Created: 2012-07-18T14:13:15.000+0000 Last Updated: 2012-07-18T14:14:28.000+0000 Status: Open Fix version(s): Reporter: Arnaud Lemercier (arnolem) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Pdf

Related issues: Attachments:


I tried to create a canvas to place an image but nothing happens. I looked at the internals of the Zend_Pdf_Canvas_Abstract::drawCanvas() method and it seems that the variable $contentsToDraw is not used.

Here is the code of my example :

<pre class="highlight"> 
$pdf = new Zend_Pdf();
$page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);

$canvas = New Zend_Pdf_Canvas($page->getWidth(), $page->getHeight());
$canvas->setFillColor(new Zend_Pdf_Color_Html('#000000'));
$canvas->drawRectangle(0, $canvas->getHeight(), $canvas->getWidth(), 0, Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE);
$page->drawCanvas($canvas, 0, $page->getHeight());

$pdf->pages[] = $page;

header("Content-Disposition: inline; filename=canvas.pdf");
header("Content-type: application/pdf");
echo $pdf->render();


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.