When you draw the barcode, you retrieve the resource in which the
barcode is drawn. To draw a barcode, you can call the draw() of
the renderer, or simply use the proxy method provided by
Zend_Barcode.
Example 60. Drawing a barcode with the renderer object
<?php
// 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::factory(
'code39', 'image', $barcodeOptions, $rendererOptions
)->draw();
Example 61. Drawing a barcode with Zend_Barcode::draw()
<?php
// 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
);




