Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

Barcodes

The Barcodes module integrates the tecnickcom/tc-lib-barcode PHP barcode library into Drupal. More information about this library may be found on that project page on GitHub.

For use in Drupal, the Barcodes module provides a Field Formatter for various field types, a Block plugin, Token module support, and a Twig Filter to display various field types as rendered Barcodes.

Currently supported field types

  • email
  • integer
  • link
  • string
  • telephone
  • text
  • text_long
  • text_with_summary
  • bigint
  • uuid

More field types can be added by the use of hooks.

Available barcode types

The Barcodes module supports 37 different kinds of 1D and 2D barcodes, including QR codes.

Output formats

Barcodes are generated in one of five formats that may be embedded directly into an HTML document.

Data types

Each type of barcode was designed to hold data with a very specific content and length.

Using the barcode Twig filter

The Barcodes module Twig filter can be used in a Twig template to format any piece of data as a barcode.

Using the barcode block

The Barcodes module provides a Block so you can add and position a barcode anywhere on any page of your site.

Using the barcode field formatter

The Barcodes module provides a field formatter, used to display any field of any content type as a barcode.

Drush commands

Drush commands make working with Barcodes easier

Examples / Recipes

A place to find examples of how to use the Barcodes module for some common tasks.

Guide maintainers

tr's picture