Zebra Programming Language

from Wikipedia, the free encyclopedia
zebra
Publishing year: 1989
Developer: Zebra Technologies
Influenced by: ANSI BASIC
Operating system : Independently

The Zebra Programming Language ( ZPL ; German Zebra programming language ) is a printer description language from Zebra Technologies . It is used in particular for label printers . The original ZPL were further developed to ZPL II, whereby there is no 100% compatibility. ZPL II is now emulated by many label printers from various manufacturers . One example is the Monarch Language Interpreter (MLI) from Avery Dennison .

Later the Zebra Basic Interpreter (ZBI) was integrated into the printer, which according to the manufacturer Zebra Technologies can be seen as an extension to ZPL II. This is an interpreter based on ANSI -Basic, which is primarily intended to avoid reprogramming software when replacing a printer that was previously operated with a label printer from a competitor from Zebra. With ZBI it should be possible for the Zebra printer to receive the print data in a "foreign" data format and for this to then convert the data to ZPL II.

The forerunner of ZPL is EPL (Eltron Programming Language), the printer description language of Eltron International which merged with Zebra Technologies.

Commands

The commands of the language always begin with a circumflex (' ^'). ZPL II currently understands over 170 commands. All formatting must ^XAbegin with the command and ^XZend with . For example, the font size is ^ADN,x,xannounced to the printer , where is xan integer ; ^ADN,18,10is the smallest size and ^ADN,180,100the largest allowed.

Since ZPL is the language for controlling label printers, there are commands for the printer and commands for the current label. Commands for the printer, so-called control commands , begin with the prefix ~ . The label format commands begin with the above. Prefix ^ . However, these prefixes are also configurable using the ~ CT (for printer commands ) and ^ CC for format commands.

A command has the following structure: Prefix command code [ parameter, ... ]

The prefix is ​​^ or ~, the command code consists of one or two letters A – Z, and the parameters (if necessary) follow directly and separated by commas. This becomes clear with the ^ A command (see next section). A parameter is typically either a character or an integer. For yes / no options i. d. Usually Y used for yes or activate and N for no or deactivate. Optional parameters are simply left out, but the commas must be given!

Comments that are ignored by the printer (or ZPL processor) begin with ^FXand end before the next command prefix.

Typeface

There are several commands to select a font. The simplest is ^A:

^Afo,h,wselects the font f with the orientation o and character dimensions w wide by h high. The parameters o , h and w are optional. The font is specified using a letter or number, with the available fonts depending on the printer model. Typical fonts are: A (tiny), D (small), E (OCR-B), H (OCR-A) and P to V (from tiny to huge). There is also the font 0 (zero), which is freely scalable. The orientation has four possible values: N = normal (not rotated), R = rotated 90 ° clockwise, I = rotated 180 °, B = rotated 270 ° clockwise. Of course, is standard N .

Similar to ^ AfN, h, w, the command selects the font f with the character dimensions, but this font will be selected as the future standard font. ^CFf,h,w

ZPL-enabled printers support i. d. Usually several character sets. The command is used to set the current character encoding . The parameter x specifies a numerical code that defines the coding, e.g. B. 0 to 12 are single-byte encodings for different countries, 13 is code page 850, 27 is code page 1252, 15 is Shift-JIS, 28 is Unicode UTF-8 etc. (The support may depend on the firmware version and the coding tables / files.) ^CIx

Individual evidence

  1. www.tracerplus.com . (PDF)
  2. Zebra merger: Zebra Technologies Corp.'s shareholders ... Retrieved November 29, 2012 (English).
  3. Programming Guide for ZPL II, ZBI 2, Set-Get-Do, Mirror, WML. (PDF; 6.59 MB) (No longer available online.) Zebra Technologies Corporation, September 1, 2013, p. 375 , archived from the original on April 16, 2014 ; accessed on April 16, 2014 (English). Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice.  @1@ 2Template: Webachiv / IABot / www.zebra.com

Web links