labels

v0.3.1
com.yaktool/labels Checked 1 day ago Published 3 months ago

Labels: FBA (FNSKU) & GS1 SSCC pallet labels (PDF/ZPL), plus a ZPL-to-PDF renderer.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_fnsku_labels Generate a print-ready Amazon FBA (FNSKU) label PDF

Lay out FNSKU labels as an exact-physical-size PDF for 30-up US Letter (Avery 5160 geometry), A4 24-up, or 2"×1" / 2.25"×1.25" thermal rolls, and write it to `out`. Code 128 bars are aligned to the target printer dot grid (203/300 dpi) — X-dimension is always a whole number of printer dots, which is what makes the printed label scan reliably. EVERY ROW IS VALIDATED FIRST: not 10 characters, lowercase, punctuation → the row is rejected and reported (LBL-F,* findings), never silently printed; a 12–13 digit input is called out as a UPC/EAN pasted into the wrong column. X00 and B0 (FNSKU=A…

ParameterTypeDescription
format *stringLabel sheet/roll format.
out *stringAbsolute path of the PDF to write. Never overwrites an existing file.
calibrationOnlybooleanWrite the print-calibration test page for `format` instead of labels.
dpinumberTarget printer density for bar alignment (default 300; 203 for common thermal printers).
itemsarrayLabels to generate. Optional only when calibrationOnly is true.
startCellinteger0-based first cell on page 1, to continue a partly used sheet (sheet formats only).

generate_logistic_labels Generate GS1 logistic (SSCC pallet) labels — PDF or ZPL

Lay out GS1-compliant logistic labels (A6/4"×6" SSCC pallet label, or A5/6"×8" with trade item data) and write them to `out` — as an exact-physical-size PDF, or as ZPL when `out` ends in .zpl (bar-by-bar geometry identical to the PDF; send the file straight to a Zebra-compatible thermal printer). THE LAYOUT AND NUMBERS ARE THE OFFICIAL ONES: three building blocks with the SSCC barcode always lowest, 31.75 mm bars (that is the official bar height — the "32 mm" people remember is a carton placement distance), X-dimension pinned to whole printer dots inside the 0.495–0.940 mm window (4 do…

ParameterTypeDescription
format *stringLabel size. a6/4x6 = SSCC-only compact; a5/6x8 fit trade item data.
items *arrayPallet labels to generate.
out *stringAbsolute output path — .pdf for print-at-100% PDF, .zpl for raw ZPL. Never overwrites.
dpinumberPrinter density (default 300). Zebra "203/300 dpi" = 8/12 dots per mm.

render_zpl Render ZPL (Zebra label code) to an exact-size PDF

Parse ZPL II text, render every ^XA…^XZ label block, and write an exact-physical-size PDF to `out` — proof a label file before it costs a strip of label stock. SUPPORTED SUBSET: label framing (^XA ^XZ ^PW ^LL), positioning (^FO), boxes (^GB), text (^A0/^CF/^FD) and Code 128 barcodes (^BC modes N and A with >; / >8 escapes) — bars are drawn by the same encoder as this suite's generators, cross-checked against two independent barcode libraries. HONEST COVERAGE, NEVER GUESSES: commands outside the subset (other symbologies like ^B3/^BQ/^BX, images ^GF, rotated fields, firmware check-digit m…

ParameterTypeDescription
out *stringAbsolute path of the PDF to write. Never overwrites.
zpl *stringThe ZPL II text (one or more ^XA…^XZ blocks).
dpmmnumberPrinter density the coordinates assume: 8 dots/mm (203 dpi, default) or 12 (300 dpi).