alpin11 / twig-barcode
There is no license information available for the latest version (v1.2) of this package.
Symfony Bundle to generate barcodes within Twig
v1.2
2021-09-16 08:06 UTC
Requires
- picqer/php-barcode-generator: ^2.0
- symfony/symfony: ^3.4 || ^4.0
- twig/twig: ^2.4 || ^3.0
This package is auto-updated.
Last update: 2024-11-16 15:24:32 UTC
README
Generate barcodes within twig
Installation
Install through composer:
composer require alpin11/twig-barcode
If you want to generate PNG or JPG images, you need the GD library or Imagick installed on your system as well.
Usage
Simply use it like any other Twig function:
barcode_html_ean13(theBarcodeValue, widthFactor = 2, totalHeight = 30)
Options
Width Factor
With that option you can manipulate the width of the barcode. Default is 2
.
That means, the generated width of the barcode will be multiplied with you width factor.
Total Height
With that option you can set the height of the generated barcode. The default is value is 30
Supported Formats
HTML
barcode_html_*
SVG
barcode_svg_*
PNG
barcode_png_*
JPG
barcode_jpg_*