zpl-parser
v0.1.0
Published
Browser-first ZPL parser and graphic-field utilities
Maintainers
Readme
zpl-parser
Browser-first utilities for parsing ZPL labels into renderer-neutral object specifications.
Features
- Parse common ZPL text, box, circle, ellipse, diagonal, barcode, and QR fields.
- Choose
exactorsimplifiedimport fidelity. - Decode and encode
^GFgraphics, including hexadecimal, ACS, Z64, and B64 payloads. - No canvas, UI, or application framework dependency.
Install
npm install zpl-parserFrom GitHub before an npm release:
npm install github:Cjmatthews/zpl-parserUsage
import { parseZpl } from "zpl-parser";
const result = parseZpl("^XA^FO20,20^FDHello^FS^XZ", {
fidelity: "exact",
});
console.log(result.objects);The returned ZplObjectSpec values are renderer-neutral. Applications map them to their own canvas or document model.
Scripts
npm test
npm run buildLicense
MIT
