This allows the generation of a barcode via a fieldtype, variable or twig filter.
Barcode Options
All instances of barcode accept the following parameters:
- Code: number or alphanumeric depending on the barcode type.
- Format: svg or png (default: svg)
- Type: see below for all accepted types (default: EAN13)
- Width factor: this set with width factor of the bars (default: 2)
- Height: the in pixels of the bars (default: 30)
- Color: the hex value of the bars (default: '#000000')
Using Barcode
Twig variables:
{{ craft.barcode.generate(123456789) }}
{{ craft.barcode.generate(123456789, 'png', 'EAN13', 2, 30, '#000000') }}
Twig Filters:
{{ 123456789|barcode }}
{{ 123456789|barcode('png', 'EAN13', 2, 30, '#000000') }}
- Installation Instructions
To install this plugin, copy the command above to your terminal.
- Active Installs
- 24
- License
- MIT
- Last release
- July 20, 2022
- Activity (30 days)
- 0Closed Issues0Open Issues0Merged PRs0Open PRs