Zebra Programming Language

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 114.143.86.219 (talk) at 09:18, 11 May 2016 (→‎Example). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Zebra Programming Language
Zebra logo
DeveloperZebra Technologies
OSindependent
Influenced by
ANSI BASIC

Zebra Programming Language (ZPL and ZPL II) is a page description language from Zebra Technologies. It is used primarily for labeling applications. The original ZPL was advanced to ZPL II, but a full compatibility with the older version is not given. Meanwhile, ZPL II is emulated by many label printers of various producers.

Later, the Zebra Basic Interpreter (ZBI) was integrated into printer software, which is seen as an advancement to ZPL II by the producer and is ANSI BASIC oriented. Primarily, it is intended to avoid a refactoring of code when changing the printer, if the old printer software was written by a label printer of a competitor. With ZBI, it should be possible that the Zebra printer gets an "alien" data format and converts it to the requested ZPL II format automatically. [1]

Some printers also support the older Eltron Programming Language (EPL) for printers.

Commands

The language commands always start with a caret sign ('^'). Currently, more than 170 commands exist in ZPL II. Each format has to start with the command ^XA and end with ^XZ.[2] For instance, the font size is sent to the printer with the ^ADN,n,m command, where n and m are integers; ^ADN,18,10 is the smallest size and ^ADN,180,100 the largest.

Example

Wikipedia "label" as described in ZPL
Wikipedia "label" as described in ZPL

A simple output displaying the text "Wikipedia" can be made using code like below.

^XA^LH 100,100
^FO20,10^ADN,20,40^FDWikipedia^FS
^LH0,0
^XZ

References

  1. ^ "Zebra Basic Interpreter 2.0". Zebra.com. Retrieved 2013-12-05.
  2. ^ "ZPL II Programming Guide (vol. I)" (PDF). http://www.ptshome.com/: Portable Technology Solutions. p. 6. Retrieved 2011-04-14. {{cite web}}: External link in |location= (help)

External links