LuaRocks.org had a security incident in September 2026. Read the incident report.

lua-zint-svg

Pure Lua barcodes: Code 39, Code 128, GS1-128, UPC, EAN, ITF, SSCC, and QR

$ luarocks install lua-zint-svg

Draw barcodes from Lua. No C library, no image library, and no
network at runtime. You get an SVG document, or a PDF Form XObject
content stream a report writer can place on a page.

local zint = require "zint"

local svg = zint.barcode({
barcode = "qrcode",
data = "https://example.invalid/report",
})

local form = zint.barcode({
barcode = 34, -- UPC-A
data = "12345678901",
filetype = "PDF",
})

form.kind is "form-xobject". form.bbox, form.content, and
form.resources are ready for the writer. The writer supplies the
object number, the length, the Form dictionary, and the Do.

This release draws these, by name or by id:

Code 39 8
GS1-128 16
Code 128 20
Code 128 (suppress C) 60
Flattermarken 28
UPC-A 34
UPC-A, check digit supplied 35
EAN-8 10
EAN-13 15
UPC-E 37
UPC-E, check digit supplied 38
Interleaved 2 of 5 3
ITF-14 89
NVE-18 (SSCC) 75
QR Code 58
GS1 DataBar Omnidirectional 29
GS1 DataBar Stacked Omnidirectional 80
GS1 DataBar Expanded 31
GS1 DataBar Expanded Stacked 81
Data Matrix 71
PDF417 55
Compact PDF417 56
MaxiCode 57
USPS Intelligent Mail 85
Aztec 92
EAN-2 add-on 11
EAN-5 add-on 12
ISBN 69

Refer to GitHub for more information about each symbology.

Needs Lua 5.5 or newer. The rock builds no C.

Source, samples, and issues, or to request another zint-supported symbology:
https://github.com/500Foods/lua-zint-svg
https://github.com/500foods/lua-zint-svg/issues

Versions

1.0.0-112 hours ago1 download
0.2.0-118 hours ago2 downloads
0.1.0-119 hours ago(revision: 2)1 download

Dependencies

lua >= 5.5

Manifests