zendframework/zf2 — pull request #5385 by steverhoades (2013-10-30 17:06:23+00:00)
Title: Resolves #4708 - adding transparent background support to barcode

There are currently no tests for this, the code in general here could probably be cleaned up a bit. Also, I have noticed that there is currently no 2.0 documentation on Barcode and ZendPdf doesn't exist.

Example Usage for Image:
```
// Only the text to draw is required
$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');

// No required options
$rendererOptions = array('imageType'=> 'png', 'transparentBackground' => true);

\Zend\Barcode\Barcode::factory(
'code39', 'image', $barcodeOptions, $rendererOptions
)->render();
```

Example Usage for SVG:
```
// Only the text to draw is required
$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');

// No required options
$rendererOptions = array('transparentBackground' => true);

\Zend\Barcode\Barcode::factory(
'code39', 'svg', $barcodeOptions, $rendererOptions
)->render();
```