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.
| Command | Syntax | Status | Description |
|---|---|---|---|
! | ! <offset> <xres> <yres> <h> <qty>! 0 200 200 210 1 | Supported | Opens a print session: offset, horizontal and vertical resolution, label height in dots and copy count. Height and copies drive the preview. |
PAGE-WIDTH | PAGE-WIDTH <w>PAGE-WIDTH 576 | Supported | Sets the label width in dots (short form PW). Without it the preview uses 576 dots. |
TEXT | TEXT <font> <size> <x> <y> <data>TEXT 4 0 30 40 Hello World | Partial | Draws 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. |
TEXT90 | TEXT90 <font> <size> <x> <y> <data>TEXT90 4 0 30 40 Vertical | Partial | Text rotated 90° counter-clockwise; otherwise identical to TEXT. |
TEXT180 | TEXT180 <font> <size> <x> <y> <data>TEXT180 4 0 30 40 Upside Down | Partial | Text rotated 180°; otherwise identical to TEXT. |
TEXT270 | TEXT270 <font> <size> <x> <y> <data>TEXT270 4 0 30 40 Vertical | Partial | Text rotated 270° counter-clockwise; otherwise identical to TEXT. |
BARCODE | BARCODE <type> <narrow> <ratio> <h> <x> <y> <data>BARCODE 128 1 1 100 50 150 123456 | Partial | Draws 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. |
LINE | LINE x1 y1 x2 y2 tLINE 0 300 560 300 2 | Supported | Draws a line between two points with the given thickness (short form L). |
BOX | BOX x1 y1 x2 y2 tBOX 10 10 560 200 2 | Supported | Draws a rectangle outline between two corners with the given border thickness. |
EXPANDED-GRAPHICS | EG <width_bytes> <height> <x> <y> <hex>EG 2 4 30 40 FFFF80018001FFFF | Supported | Draws 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. |
PRINT | PRINTPRINT | Supported | Ends the session and prints; the preview treats it as the end of the label. |
FORM | FORMFORM | Printer-only | Feeds to the top of the next form — a printer action with no effect on the image. |
CONTRAST | CONTRAST nCONTRAST 0 | Printer-only | Sets print darkness on the device; recognized, not drawn. |
TONE | TONE nTONE 0 | Printer-only | Fine-tunes print darkness; recognized, not drawn. |
SPEED | SPEED nSPEED 3 | Printer-only | Sets print speed on the device; recognized, not drawn. |
JOURNAL | JOURNALJOURNAL | Printer-only | Switches to journal (continuous) media mode; recognized, not drawn. |
SETMAG | SETMAG w hSETMAG 2 2 | Printer-only | Magnifies the following text by integer factors; outside the MVP, so recognized but not applied. |
CENTER | CENTER [width]CENTER | Printer-only | Centers the following fields; layout justification is outside the MVP, so recognized but not applied. |
Render your code: CPCL viewer
Other languages
Save your labels to your account and print them with DirectPrint — free account. Create free account