Published:
TSPL jobs fail the same way ZPL jobs do — silently. The printer accepts the file, feeds a label, and something is missing or in the wrong place. Reading the job on screen first turns a strip of wasted labels into one browser tab.
SIZE 100 mm, 150 mm
GAP 3 mm, 0 mm
CLS
TEXT 100, 100, "3", 0, 1, 1, "HELLO"
BARCODE 100, 200, "128", 100, 1, 0, 3, 3, "123456"
PRINT 1
SIZE declares the physical label in real units —
millimetres here, or inches when the unit is omitted. GAP
describes the space between labels so the printer knows where one ends.
CLS clears the image buffer; without it, the previous job's
content can print again. Content commands then draw into that buffer, and
PRINT commits it. A missing CLS or
PRINT is one of the most common reasons "nothing happened".
Validation reads the job and reports findings with positions rather than a single pass/fail. The categories you will meet most:
TEXT,
BARCODE and friends take a fixed number of comma-separated
arguments; a missing one shifts every following argument into the wrong
slot, so the command is skipped rather than drawn wrongly.DIRECTION, OFFSET, BLINE,
DENSITY, SPEED, SET and
CODEPAGE are recognised and reported, but they are not drawn.
They change how the mechanism behaves — feed direction, top-of-form
offset, black-mark tracking, burn darkness, print speed, code page — and a
screen render cannot honestly reproduce that. Seeing them listed as
printer-behaviour findings means the preview is correct and the remaining
question belongs to the hardware.
The practical consequence: if your on-screen label is right but the
printed one is rotated or offset, look at DIRECTION and
OFFSET before you touch the layout.
CLS,
PRINT and whether any content command was skipped.Both steps live here: the TSPL viewer renders the job and the TSPL validator lists the findings. The command reference shows every command the engine understands, with its coverage level.
Yes. A browser renderer draws the same content commands a printer would — SIZE, GAP, CLS, TEXT, BARCODE, QRCODE, BOX, BAR, REFERENCE and PRINT — and reports findings with positions instead of a single pass or fail.
Most often a missing CLS or PRINT. CLS clears the image buffer and PRINT commits it; without PRINT the printer never outputs, and without CLS the previous job's content can come back. A field-count error early in the job also skips every command that follows it.
ZPL is the language Zebra thermal printers understand. How to read the commands, how a label is put together, and the most common mistakes.
Which barcode symbology should I use?EAN-13, Code 128 or QR? Practical rules for picking a barcode based on your data, your space and the scanner that has to read it.
How to preview a ZPL file without a printerA ZPL file is just text — the label only exists once something draws it. Three practical ways to see a ZPL label before it reaches the printer.