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

ProductBarcode
Espresso beans, 1 kg 87123456789068712345678906
Oat milk, 1 l 40063813339314006381333931
Design Patterns 97802016336109780201633610
Paper filters 54012345678985401234567898

{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-000042PAD-2026-000042

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

The other types

TypeBarcodeTag
EAN-8 9638507496385074 {barcode '9638507', type='ean8'}
UPC-A 036000291452036000291452 {barcode '03600029145', type='upca'}
Bars only, in colour PAD {barcode 'PAD', height=30, scale=3, plain, color='#2e7d32'}