CPCL FOR LINK-OS PRINTERS
Page 17 of 329 1073699-001
3 Introduction to CPCL
CPCL, short for Comtec Printer Control Language, is the name of a printer control language that was used
in printers originally made by Comtec Information Systems, which Zebra Technologies acquired in 2000.
The language consists of two parts, a label formatting language and an unformatted test printing system
called line print mode.
Although the ZPL (Zebra Printer Language) is the preferred language for new development, support for
CPCL is still included in select Link-OS enabled ZPL printers for compatibility with existing applications.
It is important to understand that CPCL is maintained only for backwards compatibility, and new features
added to ZPL are generally not made available in CPCL.
Commands in the CPCL formatting language are almost entirely represented in human-readable ASCII.
There are two modes of operation in the CPCL language, depending on the operation you intended to
perform.
All operations in CPCL begin with the exclamation mark character “!”. What comes after this character
determines which of the primary roles will be used to execute commands. These roles are called sessions.
The “!” character signals to the printer that the CPCL interpreter is the target of this data stream, and is a
request to begin a session. If this character does not start a line of transmission, the data will fall
through to the next parser.
In CPCL, all commands should be transmitted in upper case. String values for commands may be
transmitted in either case. By default, transmission of CPCL is performed in 8-bit ASCII characters.
Once you have entered a CPCL session using the “!” character, every line in the session must be
terminated with the CR and LF characters.
Sessions are ended with a specific command which terminates them. See each session below for more
details.
If you transmit a command that CPCL doesn’t know how to process, or a command in the wrong case,
the entire line containing the command is ignored up to the next <CR> and <LF> character sequence.
If you transmit an invalid or unrecognized session command, the entire session will fall through to the
line print system if it is enabled, or if it is not enabled, the next parser in the system. For more
information on line print see section 3.7 on page 25.
Advanced Notes
See CPCL Line Print on page 164 for more information the handling of data which does not begin with an
exclamation mark as well as parsing order.
It is possible to change the character used to begin sessions from the exclamation point to other characters. This
character is called the CCL key, and documentation on changing it can be found on page 293. At power on, it is
always set to the “!” by default. This document will assume you are using this default.
Some examples in the past have shown CPCL lines terminated with space characters. While this may function in
some cases, use of this syntax is not recommended for new labels as it is not compatible with all commands.