Skip to main content

ZPL & RFID

Presto's RFID support is what sets it apart: it doesn't blind-write tags, it verifies every label and reprints only the ones that failed. ZPL II is the deeply-supported language.

ZPL templating & transforms

Templates use {{0}}, {{1}}, … placeholders substituted byte-safely — a missing index is an error, never a half-filled label. When it sends a job Presto injects a small set of geometry and darkness transforms right after ^XA, driven by the printer's calibration:

  • ^PW print width (from dpmm × label width)
  • ^LS / ^LT label shift and top
  • ~SD darkness, ^PR speed

Payloads are passed through 8-bit-transparent — never re-encoded.

Encode & verify

For any label that writes a tag (^RFW / ^RMW / ^WT), Presto reads the result back two ways and combines them:

  • ~RV reports — the printer's own per-batch encoded / voided accounting.
  • ^HV host verification — Presto injects a read-back of the encoded EPC before the final ^XZ. A non-empty EPC confirms the encode; an empty one means the tag voided. This is the robust signal, since some printers emit nothing for ~RV.

The per-label result surfaces as { index, printed, encoded, voided, epc } on the job.update event.

note

Exact RFID report framing varies by printer firmware. Presto handles the common Zebra/Link-OS variants; treat the wire-level bytes as an implementation detail, not a contract.

Void handling & reprint

When a tag voids, Presto reprints only that label (in order), up to a configured limit. Exhaust the limit and the job returns RFID_VOID_LIMIT. This is controlled in [rfid]:

  • auto_reprint_voids — reprint voided labels automatically.
  • max_reprints — how many times before giving up.
  • preflight — run a host-status check before the batch.

Calibration

RFID encoding depends on where the tag's chip sits relative to the printer's antenna. Calibrate RFID (^HR) sweeps tag positions and records a per-position read/write heatmap for a (printer, media) pair, producing a program position (e.g. B14 / F0), read power, and write power. Calibrate once per printer + media combination.

Media, chips & inlays

Presto models the physical tag so it can calibrate and encode correctly:

  • Media — a label stock: size, material, inlay, and the tag's epc_bits / user_mem_bits / tid_bits.
  • Chip — the RFID silicon and its limits (e.g. max EPC bits).
  • Inlay — the antenna + chip and its footprint.

A seeded reference library covers common inlays and chips; calibration is keyed by (printer, media).

Label Designer

The admin UI includes a visual Label Designer — text, barcode, QR, box, line, and image elements (plus RFID via the media model) — that emits ZPL, with a server-side rendered live preview and an image-to-ZPL converter.