Tools/Printer languages/CPCL command reference

CPCL Command Reference

Every command the Labelixa CPCL 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 CPCL, the language of Zebra mobile printers (QL/ZQ/iMZ and compatibles). Many of these printers also accept ZPL or EPL in separate, manufacturer-documented modes — for those languages use the ZPL or EPL viewer.
Coverage: 6 commands supported, 5 partially supported, 7 recognized as printer-behaviour (not drawn). The preview renders at 203 dpi and is an interpretation of the Zebra CPCL programming guide — it has not been verified against a physical printer.
CommandSyntaxStatusDescription
!! <offset> <xres> <yres> <h> <qty>
! 0 200 200 210 1
SupportedOpens a print session: offset, horizontal and vertical resolution, label height in dots and copy count. Height and copies drive the preview.
PAGE-WIDTHPAGE-WIDTH <w>
PAGE-WIDTH 576
SupportedSets the label width in dots (short form PW). Without it the preview uses 576 dots.
TEXTTEXT <font> <size> <x> <y> <data>
TEXT 4 0 30 40 Hello World
PartialDraws text (short form T): font number, sub-size, x, y, then the data as the rest of the line. Font heights are approximate; the sub-size is outside the MVP.
TEXT90TEXT90 <font> <size> <x> <y> <data>
TEXT90 4 0 30 40 Vertical
PartialText rotated 90° counter-clockwise; otherwise identical to TEXT.
TEXT180TEXT180 <font> <size> <x> <y> <data>
TEXT180 4 0 30 40 Upside Down
PartialText rotated 180°; otherwise identical to TEXT.
TEXT270TEXT270 <font> <size> <x> <y> <data>
TEXT270 4 0 30 40 Vertical
PartialText rotated 270° counter-clockwise; otherwise identical to TEXT.
BARCODEBARCODE <type> <narrow> <ratio> <h> <x> <y> <data>
BARCODE 128 1 1 100 50 150 123456
PartialDraws a barcode (short form B): type, narrow width, ratio, height, x, y, data. MVP types: 128, 39, EAN13, UPCA — the shared zint path also used by the ZPL engine.
LINELINE x1 y1 x2 y2 t
LINE 0 300 560 300 2
SupportedDraws a line between two points with the given thickness (short form L).
BOXBOX x1 y1 x2 y2 t
BOX 10 10 560 200 2
SupportedDraws a rectangle outline between two corners with the given border thickness.
EXPANDED-GRAPHICSEG <width_bytes> <height> <x> <y> <hex>
EG 2 4 30 40 FFFF80018001FFFF
SupportedDraws a 1-bit image from hex data (short form EG): width in BYTES (8 dots), height in dots, x, y, hex data. A 1 bit prints black — the opposite of TSPL BITMAP.
PRINTPRINT
PRINT
SupportedEnds the session and prints; the preview treats it as the end of the label.
FORMFORM
FORM
Printer-onlyFeeds to the top of the next form — a printer action with no effect on the image.
CONTRASTCONTRAST n
CONTRAST 0
Printer-onlySets print darkness on the device; recognized, not drawn.
TONETONE n
TONE 0
Printer-onlyFine-tunes print darkness; recognized, not drawn.
SPEEDSPEED n
SPEED 3
Printer-onlySets print speed on the device; recognized, not drawn.
JOURNALJOURNAL
JOURNAL
Printer-onlySwitches to journal (continuous) media mode; recognized, not drawn.
SETMAGSETMAG w h
SETMAG 2 2
Printer-onlyMagnifies the following text by integer factors; outside the MVP, so recognized but not applied.
CENTERCENTER [width]
CENTER
Printer-onlyCenters the following fields; layout justification is outside the MVP, so recognized but not applied.

Render your code: CPCL viewer

Other languages

EPL · TSPL · ZPL

Save your labels to your account and print them with DirectPrint — free account. Create free account