
ZPL Basics
The ZPL Format (Receipt Form or Template)
54
P1026208-001 Rev. B Software Integrator Guide 10/29/2010
The ZPL Format (Receipt Form or Template)
The ZPL format (form) is the basic building block used to control and print with your Zebra
kiosk printer. It can be used to simply print a receipt or in contrast, recall and process a
sequence of stored formats (forms) in the printer, all from a single format (form). Formats
can be created (and reused) to do common or repeated functions to the printer: e.g.
deleting all objects stored in B: memory or printer configuration settings for custom pre-
printed media. ZPL format (form) and the format command structure’s capabilities are
designed to minimize data communications traffic and file size.
A format’s (form’s) most basic structure initializes the printer to process format commands,
do one or more format command processes to set printer actions or place objects in the
print image map, and to finish the format (form). When the printer has finished processing
the format, the printer will print any object placed in the image map (if any), run printer
actions, and then it clear the image map and temporary commands.
ZPL Format Structure Guidelines
The ZPL programming is designed to minimize the amount of programming (coding) and
data communication traffic needed to operate and print receipts, as well as, code reuse.
To facilitate this, the ZPL command and parameter operations includes the ability to save
certain settings for use between receipt (or label) formats or in some cases, even through
a power cycle or reset. Other commands can use commands that provide global settings
or parameters for use one or more times later within the receipt format by the printer to
create objects in the image map. These global settings and parameters can be changed
multiple times. Other commands describe the receipt (or label), image map (where print
objects get placed on the receipt), special print effects, and media handling (print number
of copies, cut, present receipt for removal, etc.). The code minimizing design and order
dependence of the ZPL format require a structural sequence to work and work
consistently from format to format.
Figure 5-4 • Basic ZPL Format
^XA – Start format command.
All other format commands (other than ^FX)
are placed between the ^XA and ^XZ and
processed by the printer.
Objects placed in the print image are
printed when the printer processes the
format’s (form’s) last command, ^XZ.
^XZ – End format command.
Comentários a estes Manuais