ZPLII language overview
- ZPL language is a script language, divided into ZPL language and ZPL II language
- Zebra printers support one of the most extensive languages
- ZPLII language supports complex label formats, such as text, pictures, barcodes, serial number printing, etc.
- ZPLII files can be implemented in the following two ways:
The difference between ZPLII and ZPL
- ZPL II is not 100% compatible with ZPL
- Main differences:
- For ZPL II, when a command is received, it will be executed immediately. For ZPL, only when the printer receives AXZ (End Format), will it execute all received commands
- —Some instructions in ZPL are enhanced or extended in ZPL II
- ZPLII supports lowercase, uppercase or mixed case input instructions
- Added some new commands
ZPL II language function
- Print various label formats
- Text, graphics, barcode
- Set printer parameters
- Get printer configuration and status information
ZPL II language related concepts
- Field (field)
- ZPL object
- Picture
- Label format file
Printer device name
- Printer storage device
- Specify ZPL II target objects (images, label formats, fonts) to different storage areas
- Storage device name:
- R: Printer DRAM library (read/write) memory
- B: Optional memory: other optional memory PCMCIA cards
- E: Flash memory (read/write) flash memory
- Z: Internal ZPL II stored object library (read only)
- A: CF card (read and write)
- The default memory is DRAM
- When calling the object, the search priority order: DRAM, RAM, extra EPROMjnternal ZPL II (R:, B:, E:, Z:, * or? (All))
Command type
- format commands
- Start with eight
- Used to set the label format and data
- Multiple format instructions are executed in sequence
- control commands
- Start with ~) Giri.Gom
- Force the printer to perform a specified operation immediately
- Can interrupt the format command in the printer data buffer
Format instructions
ZPL format commands have the following classifications
- Format bracket commands
- label definition commands-label definition commands
- Field definition commands-field definition commands
- Field default commands-field default commands
- Format default commands-format default commands
- Format rotation commands-format rotation commands
- Printer control commands-printer control commands
- Alphanumeric field commands-alphanumeric field commands
- Bar code field commands-bar code field commands
- graphic image commands
Change command prefix
- The symbol (^) is an ASCII character, equal to 5E HEX, 94 Decimal
- The symbol (~) is an ASCII character, equal to 7E HEX, 126 Decimal
- The time suffix of format command and control command can be changed through ZPLII command
- ^CT or ~CT (change tilde ~)
- ^CC or ~CC (change caret ^)
ZPL configuration
Manage printer configuration through ZPL programming
In order to print out the first label quickly, the printer has been designed to dynamically change printer settings. Commonly used printer parameters will be retained for subsequent format use. These settings are always effective until subsequent commands are changed, the printer is reset, power cycled, or until the four (4) flashes of the “paper feed button mode” process is used to restore the factory default parameter values. The ZPL configuration update command (^JU) can be used to save and restore the printer configuration to initialize or reinitialize the printer with pre-configured settings.
- To retain the settings after a power cycle or resetting the printer, the ^JUS command should be sent to the printer to save all current frequently used settings.
- Use the ^JUR command to recall the value and restore the last saved value to the printer.
As mentioned above, ZPL can store all parameters with one command. The old EPL programming language supported by Zebra GK888 can be changed immediately and saved individual commands. Most configurations and settings can be shared between ZPL and EPL. For example, using the EPL command to change the speed setting will also change the speed set for ZPL operation. After issuing a power cycle or reset command in either printer language, the changed EPL setting will still be retained.
To help developers, the printer comes with a series of operating parameters and printer configuration labels. The above parameters and labels can be used through the printer “paper feed” button or see “Print test (printer configuration) label”. Zebra Setup Utility and Zebra™ Windows Driver can also print this label and other printer status labels to help users manage printer.
ZPL printer configuration format
Create a printer configuration programming file and send it to one or more printers to manage multiple printers. You can also use ZebraNet™ Bridge to copy printer settings. Figure 1 below shows the basic structure of the ZPL programming configuration file.
Refer to “ZPL Programmer’s Guide” and “ZPL Configuration Status and Command Reference” to create programming files. Use Zebra Setup Utility (ZSU) to send programming files to the printer. Windows Notepad (text editor) Can be used to create programming files.
Configuration parameter format structure
^XA — Start format command
The format command is related to the order
a) General printing and command settings
b) Media handling and operation
c) Media printing size
^JUS command can be used to save
^XZ — end format command
Comparison reference of ZPL configuration status and commands
The “Printer Configuration Label” shown below lists most of the configuration setting values that can be set through ZPL commands. Some printer options and differential models will only be displayed after they are installed in the printer.
Figure 2 • Configuration label printout

Table 2 • Reference for ZPL command and configuration receipt labeling

Starting from this position in the “Configuration Receipt” list, the printout lists the sensor settings, and the displayed values are used to troubleshoot the sensor and media operation. This information is generally used for printer troubleshooting by Zebra technical support personnel.
The configuration settings listed here are next to the “Remove Tag” sensor value. These lists contain printer features that rarely change their default values, or provide status information (for example, firmware version).
Table 3 • Reference for ZPL command and configuration receipt labeling

The printer has the ability to set a command or a group of commands for all subsequent receipts or labels. These settings will still be in effect until such settings are changed, the printer is reset, or the factory defaults are restored through subsequent commands.
Printer memory management and related status reports
To help users manage printer resources, the printer supports a variety of format commands to manage storage, transfer objects (import and export) and name objects between storage areas, and provide various printer operating status reports. These commands are very similar to old DOS commands such as DIR (directory listing) and DEL (delete files). The most common reports are also part of the Zebra Setup Utility and ZebraDesigner™ Windows driver.
Figure 3 • Memory management format structure
^XA — start format command
It is recommended to use a single format command,
for repeated use
^XZ — end format command
It is recommended to process only a single command in one type of format (form). You can easily reuse a single command as a maintenance and development tool.
Many of the commands used to transfer objects and manage and report storage usage are control (~) commands. These commands do not need to be in the format (style). Regardless of whether it is in the format (form), the printer will process these commands as soon as they are received.
Notes • In order to maximize the use of the printer’s memory, the printer has an automatic memory defrag function. Multiple factors may trigger the defragmentation operation. Deleting or adding objects in storage will trigger a defragmentation operation. While the memory is being defragmented, the printer status indicator will begin to flash red, amber, and green. Do not turn off the printer power while the status indicator is flashing. If storage usage and file fragmentation are high, this operation may take several minutes.
ZPL programming for memory management
ZPL has multiple printer memory locations for running the printer, combining printed images, and storing formats (styles), graphics, fonts, and configuration settings.
- ZPL treats formats (styles), fonts, and graphics as files; the storage location is similar to a disk drive in the DOS operating system environment:
- Storage object naming: Use up to sixteen (16) alphanumeric characters, followed by a file extension consisting of three (3) alphanumeric characters:
- For example, 123456789ABCDEF.TTF
- Old-style ZPL printers with firmware V60.13 or earlier can only use the 8.3 file name format, and do not support the current 16.3 file name format.
- Allows to move objects and delete objects between different memory locations.
- Support the DOS directory style file list report as the host’s printout or status.
- Wildcards (*) are allowed during file access.
Table 4 • Object management and status report commands

Important Note • Some original ZPL fonts in the printer cannot be copied, cloned or restored to the printer by reloading or updating the firmware. If these license-restricted ZPL fonts are deleted using explicit ZPL object delete commands, you must re-purchase and re-install these fonts through the font activation and installation tool. EPL fonts do not have this restriction.
For more details, please download the relevant documents
- ZPL II Programming Guide For x.10 through x.13 Firmware Download “ZPL2-programmers-manual-2006.pdf” ZPL2-programmers-manual-2006.pdf – Downloaded 184 times – 4.15 MB
- Zpl II programming guide 2005 vol1.pdf Download “zplii-programming-guide-2005-vol1.pdf” zplii-programming-guide-2005-vol1.pdf – Downloaded 114 times – 4.67 MB
- Zpl II programming guide 2005 vol2.pdf Download “zplii-programming-guide-2005-vol2.pdf” zplii-programming-guide-2005-vol2.pdf – Downloaded 133 times – 1.40 MB