Reference
ZPL Command Reference
19 commands with syntax, parameter tables, defaults and a live example rendered right on the page. Every example opens in the viewer with one click.
Label format
- ^XAStart FormatPreview: partial
Opens a label format. Every ZPL label begins with ^XA, and the printer ignores field commands that arrive before it.
- ^XZEnd FormatPreview: partial
Closes a label format and tells the printer to image and feed the label. Without it, nothing prints.
- ^PWPrint WidthPreview: exact
Sets the printable width in dots. Anything to the right of it is clipped, which is the usual cause of labels cut off on one side.
- ^LLLabel LengthPreview: exact
Sets the label length in dots. On continuous media it is what defines where one label ends and the next begins.
- ^LHLabel HomePreview: exact
Moves the label origin. Every later ^FO and ^FT is measured from this point rather than from the top-left corner.
Fields
- ^FOField OriginPreview: partial
Places the top-left corner of the next field. It is the command you will use more than any other.
- ^FTField TypesetPreview: partial
Places a field by its baseline rather than its top-left corner, so text of different sizes lines up.
- ^FDField DataPreview: exact
Supplies the content of a field — the text, the barcode payload or the QR data.
- ^FSField SeparatorPreview: exact
Ends the current field. Every field needs one, and a missing ^FS makes the rest of the label print as part of it.
- ^FHField Hexadecimal IndicatorPreview: exact
Lets ^FD carry bytes written as _XX escapes — the only way to print a literal ^ or ~ in field data.
- ^FRField Reverse PrintPreview: exact
Inverts the next field against its background: black becomes white, so text can be knocked out of a filled box.
- ^FXCommentPreview: exact
Adds a non-printing comment. Convenient for labelling sections of a template, with one sharp edge around carets.
Text and fonts
- ^AScalable / Bitmap FontPreview: partial
Selects the font, size and rotation for the next field. ^A0 is the scalable font used by most modern templates.
- ^CFChange Alphanumeric Default FontPreview: partial
Sets the font and size used by every following field that does not specify its own, so you can stop repeating ^A.
Barcodes
- ^BYBar Code Field DefaultPreview: partial
Sets the module width, ratio and height that following barcodes inherit. Module width is the main lever on whether a barcode scans.
- ^BCCode 128 Bar CodePreview: partial
Draws a Code 128 barcode — the symbology almost every shipping label uses for tracking numbers.
- ^BQQR Code Bar CodePreview: partial
Draws a QR code. The data field takes a mode prefix that is easy to get wrong and is a frequent source of unreadable symbols.