Published:
CPCL is the language of mobile printers — the belt-worn units in delivery vans and on warehouse carts. Debugging it in the field is miserable: the device is small, the operator is busy, and every test costs a receipt roll. Rendering the job on a screen removes the field trip from the loop.
! 0 200 200 210 1
TEXT 4 0 30 40 Hello World
BARCODE 128 1 1 50 30 90 123456
PRINT
The opening ! line is not decoration. It carries the
offset, the horizontal and vertical resolution, the label height and the
number of copies — so label size and quantity live there, not in separate
commands. Omit it and a renderer has to fall back on defaults, which is
reported as a finding rather than silently assumed: a job without a
session header will look plausible on screen and behave differently on the
device.
PRINT closes the job. Everything between the header and
PRINT draws into the buffer.
TEXT: use TEXT90,
TEXT180 or TEXT270. A layout that "ignores
rotation" is usually a layout that used the wrong command name.CONTRAST, TONE, SPEED,
SETMAG, CENTER, FORM and
JOURNAL are recognised and reported but not drawn. They set
burn intensity, speed, magnification behaviour and media mode on the
device — physical properties a screen cannot reproduce honestly. On mobile
printers these matter more than usual: battery level and ambient
temperature both affect how a given contrast setting actually prints, so
tune them on the device with a real roll rather than from a render.
The CPCL viewer renders the job, the CPCL validator lists findings, and the command reference shows the supported set with coverage levels. If a file's language is uncertain — mobile fleets often carry several — the language detector classifies it from the code itself.
Arabic or Hebrew sent with CPCL TEXT can print reversed or with disconnected letters. Why it happens and three ways to print right-to-left text.
TSPL BITMAP prints a black boxA TSPL BITMAP that prints as a solid black square almost always has its bits inverted: in TSPL a 0 bit prints black. Check the data, then fix it.
ZPL vs TSPL: what actually differsLabel size in dots versus real units, job structure, text and barcode syntax — the ZPL and TSPL differences that actually cost porting time.
Previewing and debugging TSPL without a printerRender TSPL in the browser, read the diagnostics it produces, and know which commands a preview deliberately does not draw.