zpl.tools

Diagnostics Reference

Every diagnostic code the ZPL engine can report, with severities, examples, and where they surface

The rendering engine reports what it skipped, fell back on, or failed to render as diagnostics. Diagnostics never alter rendering — a label renders identically with or without them, matching physical-Zebra best-effort behavior. They only make the printer's silent decisions visible, so "my label looks wrong" is answerable without printing it.

Where diagnostics surface

SurfaceHow you get them
API (the Labelary-compatible layer)X-Warnings response header when the request sends X-Linter: On (capped at 20)
Online viewerInline panel below the preview + editor squiggles; grouped so a warning repeated across a multi-label file reads as one line
Desktop appThe same shared panel and squiggles

The warnings arrive with the render — you never render twice to get them.

Severities

SeverityMeaning
infoNotable-but-normal behavior (e.g. an explicitly skipped argument slot replaced by a default)
warningThe render succeeded, but possibly not as intended (skipped command, trimmed value, fallback)
errorA piece of output could not be produced (barcode/graphic generation failure)

A render that succeeds with warnings keeps succeeding — warnings are never promoted to failures. info-level diagnostics appear in the viewers but are excluded from the API's X-Warnings header.

Codes

Codes are a stable contract — new codes may be added, but existing codes will not be renamed.

CodeDefault severityEmitted whenExample message
UNKNOWN_COMMANDwarningThe command name is not documented ZPLThis ZPL command does not exist and was ignored
UNSUPPORTED_COMMANDwarningDocumented ZPL the renderer does not implement yetcommand "^KL" is valid ZPL but is not supported by this renderer yet; it was skipped
ARGUMENT_MISSINGinfoAn argument slot was explicitly skipped (10,,30)argument 2 of ^FO omitted; default used
ARGUMENT_TRIMMEDwarningTrailing garbage trimmed per ZPL printer behaviorValue '10abc' is not a valid number; suffix 'abc' was ignored
ARGUMENT_INVALIDwarningArgument could not be interpreted; fallback usedValue 'ab' is not a valid number and was ignored
ARGUMENT_OUT_OF_RANGEwarningArgument outside its valid range; fallback namedValue 0 is less than minimum value 1; used 1 instead
RENDER_ERRORerrorBarcode / graphic generation failed at render timefailed to render Code 128 barcode (^BC): ...
RESOURCE_MISSINGwarningA stored object is referenced but does not exist^XG references image "R:LOGO.GRF" which was never stored (no matching ~DG); field skipped

Notes:

  • Case matters in ZPL. A lowercase command like ^fo reports UNKNOWN_COMMAND with a hint: ... ZPL commands are case-sensitive — did you mean "^FO"?
  • Out-of-range messages always name the fallback that was actually applied: ; used 10 instead when the engine clamps, and was used as written when it keeps your value.
  • Idiomatic trailing omissions (^FO10,20 with no third argument) are deliberately silent — that is normal ZPL, not a mistake.

Positioning

Each diagnostic points at its source, where known:

  • the command as written, including prefix (e.g. ^FO)
  • the 1-based argument number, when argument-specific
  • the byte span in the submitted ZPL — pointing at the offending argument itself for argument-level warnings — resolved to line/character positions in the viewers
  • Linting & Warnings — how the API delivers these via the X-Warnings header, and how the format compares with Labelary's
  • ZPL Commands Reference — per-command documentation and renderer support status