This plugin by webdna allows the generation of a barcode via a fieldtype, variable or twig filter.

Barcode Options

All instances of barcode accept the following parameters:

  1. Code: number or alphanumeric depending on the barcode type.
  2. Format: svg or png (default: svg)
  3. Type: see below for all accepted types (default: EAN13)
  4. Width factor: this set with width factor of the bars (default: 2)
  5. Height: the in pixels of the bars (default: 30)
  6. Colour: 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.

Reviews

This plugin doesn't have any reviews.

Active Installs
35
Version
2.0.1
License
MIT
Compatibility
Craft 3, Craft 4
Last release
July 20, 2022
Categories
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs