How can we pass a Zend_Barcode image to a Zend_PDF?

With this:
$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
$rendererOptions = array();

// Draw the barcode in a new image,
$imageResource = Zend_Barcode::draw(
    'code39', 'image', $barcodeOptions, $rendererOptions
);

I pass the $imageResource to the Zend_Pdf_Page::drawImage() method:

...
$page->drawImage($imageResource, $x1, $y1, $x2, $y2);

...
Zend Server throws: "PHP Catchable fatal error:  Argument 1 passed to
Zend_Pdf_Page::drawImage() must be an instance of Zend_Pdf_Resource_Image,
instance of Zend_Barcode_Renderer_Image given, ....."

Please advice
thnks
-- 
View this message in context: 
http://n4.nabble.com/How-can-we-pass-a-Zend-Barcode-image-to-a-Zend-PDF-tp1478435p1478435.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to