Found the solution.

Must create a image and pass to the Zend_Pdf_Image::imageWithPath() method.
so :
// Only the text to draw is required
$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');

// No required options
$rendererOptions = array();

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

imagejpeg($imageResource, 'barcode.jpg', 100);

// Free up memory
imagedestroy($imageResource);

$image = Zend_Pdf_Image::imageWithPath('barcode.jpg');

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




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

Reply via email to