What is CPCL?
CPCL is the native command language of Zebra’s mobile printers, including the ZQ, QLn, iMZ, and RW series. It came from Comtec printers and isn’t related to ZPL, although many of these printers understand both.
Example
Section titled “Example”! 0 200 200 406 1PAGE-WIDTH 576TEXT 4 0 30 40 LabelZoomBARCODE 128 1 1 50 30 120 12345678LINE 30 200 546 200 2PRINT| Command | What it does |
|---|---|
! 0 200 200 406 1 |
Starts a label: offset, resolution, label height in dots, and quantity |
PAGE-WIDTH |
Sets the label width |
TEXT |
Prints text: font, size, x, y, then the text |
BARCODE |
Draws a barcode: type, narrow bar width, ratio, height, x, y, then the data |
LINE |
Draws a line from one point to another, with a width |
PRINT |
Prints the label |
Arguments are separated by spaces, and text and barcode data run to the end of the line.
CPCL vs ZPL
Section titled “CPCL vs ZPL”| Aspect | CPCL | ZPL |
|---|---|---|
| Printers | Zebra mobile printers | Zebra desktop and industrial printers, and printers that emulate ZPL |
| Label frame | ! header … PRINT |
^XA … ^XZ |
| Separators | Spaces | Commas |
| Resolution | Stated in the ! header |
Not stated in the label |
CPCL and TSPL share command names such as TEXT, BOX, and PRINT, but TSPL separates arguments with commas.
Convert CPCL files
Section titled “Convert CPCL files”These free tools run in your browser:
- CPCL viewer: see a label without a printer.
- CPCL to PDF: get a printable PDF.
- CPCL to ZPL: convert the label for a desktop Zebra printer.
The LabelZoom API converts CPCL to and from ZPL, PDF, and images. For example, POST /api/v2/convert/cpcl/to/pdf renders CPCL as a PDF, and POST /api/v2/convert/zpl/to/cpcl converts ZPL to CPCL. Save CPCL output as bytes, not text; see Binary output.