TSPL Command Reference
Every command the Labelixa TSPL preview understands, with syntax, an example and its honest support status. Commands outside this list are reported by the validator as unknown.
This tool renders NATIVE TSPL. Many TSC printers also offer manufacturer-documented ZPL emulation — that is a separate mode; for ZPL code use the ZPL viewer.
Coverage: 8 commands supported, 3 partially supported, 7 recognized as printer-behaviour (not drawn). The preview renders at 203 dpi and is an interpretation of the TSPL/TSPL2 programming manual — it has not been verified against a physical printer.
| Command | Syntax | Status | Description |
|---|---|---|---|
SIZE | SIZE <w> mm, <h> mmSIZE 100 mm, 150 mm | Supported | Label size; with mm suffix in millimetres, without a unit in inches. |
GAP | GAP <g> mm, <o> mmGAP 3 mm, 0 mm | Supported | Gap between labels — affects the physical feed, recorded but not drawn. |
REFERENCE | REFERENCE x, yREFERENCE 0, 0 | Supported | Shifts the origin; applied to all following coordinates in the preview. |
CLS | CLSCLS | Supported | Clears the image buffer; typical start of every TSPL job. |
TEXT | TEXT x, y, "font", rot, xm, ym, "content"TEXT 100, 100, "3", 0, 1, 1, "HELLO" | Partial | Text field. Built-in fonts 0-8; other font names (TSS24.BF2…) are approximated by the number in their name. |
BARCODE | BARCODE x, y, "type", h, readable, rot, n, w, "data"BARCODE 100, 200, "128", 100, 1, 0, 3, 3, "123456" | Partial | Barcode field. MVP types: 128, 39, EAN13, UPCA. Other types are skipped with a warning. |
QRCODE | QRCODE x, y, ecc, cell, mode, rot, "data"QRCODE 100, 400, M, 6, A, 0, "https://..." | Partial | QR code with ECC level L/M/Q/H and cell width. |
BOX | BOX x1, y1, x2, y2, tBOX 40, 40, 760, 400, 4 | Supported | Box outline between two corners with a border thickness. |
BAR | BAR x, y, w, hBAR 50, 500, 700, 4 | Supported | Filled black bar. |
BITMAP | BITMAP x, y, width_bytes, height, mode, <data>BITMAP 200,200,2,16,0,?~?~?~?~ ?~?~?~?~ | Supported | Raw 1-bit image: width in BYTES (8 dots), height in dots, mode 0 overwrite / 1 OR / 2 XOR. The data is binary and a 0 bit prints BLACK (the opposite of ZPL ^GF) — if you get a solid black square, the bits are inverted. The preview draws it only when the raw bytes are sent. |
PRINT | PRINT n[, copies]PRINT 1 | Supported | Print — sets set count (and copies). |
DIRECTION | DIRECTION n[, m]DIRECTION 1 | Printer-only | Print direction — not applied to the MVP preview. |
DENSITY | DENSITY nDENSITY 8 | Printer-only | Darkness — printer behaviour, no image effect. |
SPEED | SPEED nSPEED 4 | Printer-only | Print speed — printer behaviour, no image effect. |
OFFSET | OFFSET <o> mmOFFSET 0 mm | Printer-only | Feed offset — printer behaviour. |
SET | SET <opt> <val>SET TEAR ON | Printer-only | Printer option switches (TEAR, PEEL…) — printer behaviour. |
CODEPAGE | CODEPAGE nCODEPAGE 1252 | Printer-only | Character set selection — the preview assumes UTF-8. |
BLINE | BLINE <b> mm, <o> mmBLINE 3 mm, 0 mm | Printer-only | Black-mark spacing — feed calibration, not drawn. |
Render your code: TSPL viewer
Other languages
Save your labels to your account and print them with DirectPrint — free account. Create free account