Barcodes

The {barcode} tag writes EAN-13, EAN-8, UPC-A and Code 128 barcodes as inline SVG - sharp at any size and on paper, no font, no image library. A scanner or a phone reads them straight from the screen.

Products - EAN-13

Product Barcode
Espresso beans, 1 kg 8712345678906 8 712345 678906
Oat milk, 1 l 4006381333931 4 006381 333931
Design Patterns 9780201633610 9 780201 633610
Paper filters 5401234567898 5 401234 567898

{barcode $ean, height=50} - twelve or thirteen digits are an EAN-13; given without its check digit, the tag adds it.

A shipping label - Code 128

PAD Demo Shop
Parcel PAD-2026-000042
PAD-2026-000042 PAD-2026-000042

{barcode $parcel, height=70} - letters, digits and punctuation; runs of digits are packed two to a symbol.

The other types

Type Barcode Tag
EAN-8 96385074 9638 5074 {barcode '9638507', type='ean8'}
UPC-A 036000291452 0 36000 29145 2 {barcode '03600029145', type='upca'}
Bars only, in colour PAD {barcode 'PAD', height=30, scale=3, plain, color='#2e7d32'}