Repository navigation
Custom captions
Print your own text under any barcode instead of the encoded data: a product name, "Scan to pay", an address line.
Barcode::qrCode('https://example.com/pay')->withCaption('Scan to pay');
Barcode::ean13('400638133393')->withCaption('Organic Oat Milk 1L');- Works with all 59 types, including 2D codes, stacked DataBar, postal codes and MaxiCode. Captions rotate with
->vertical(). - Also available as
--captionin the CLI andcaption=onbarcode.php.
Fixes
- Non-ASCII text in PNG output (captions, Code 128 data) is now transliterated for GD's ASCII-only built-in font ("Grüße" → "Grusse") instead of being drawn with the wrong characters. SVG, PDF, EPS and TrueType fonts already showed it correctly.