Download the PHP package ozznest/barcode-bundle without Composer
On this page you can find all versions of the php package ozznest/barcode-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package barcode-bundle
MarkupBarcodeBundle
About
This Symfony bundle provides a means of generating barcodes using the Laminas barcode component and printing them inline using a data URI. It avoids problems with parts of the Laminas component that retain state and so allows isolated barcode generation in the same execution cycle.
Installation
Add MarkupBarcodeBundle to your composer.json:
Add MarkupBarcodeBundle to your AppKernel.php:
Finally, install the bundle using Composer:
Usage
The bundle works by allowing the declaration of named barcode definitions (specifying the spec being used for the barcode, the output format, etc). These definitions are then referred to when rendering an individual barcode.
Say you had a barcode you needed to generate for an "invoice" in your application. This invoice uses barcodes that were Code 128, and you want to use PNG as the image format for the barcode (PNG is, incidentally, the default).
You can achieve this by declaring the definition in the bundle's semantic configuration:
Alternatively, if you need more flexibility, you can write your own definition class that implements Markup\BarcodeBundle\Definition\DefinitionInterface
and declare it as a service within your bundle, using a markup_barcode.definition
tag with a declared alias:
Then, within a Twig template, you would use the following Twig filter (markup_barcode_data_uri
) to generate a barcode from the text you are encoding:
License
Released under the MIT License. See LICENSE.
All versions of barcode-bundle with dependencies
symfony/framework-bundle Version ^3.4|^4
laminas/laminas-barcode Version ~2.0|~3.0
imagine/imagine Version ~0.6.0
symfony/config Version ^3.4|^4