Jump to content

Zebra Programming Language: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Tags: Mobile edit Mobile web edit
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 24: Line 24:
^FDWikipedia^FS
^FDWikipedia^FS
^XZ
^XZ
</syntaxhighlight>
</source>
[[File:Wikipedia text ZPL preview via ZPLViewer.png|Wikipedia "label" as described in ZPL]]
[[File:Wikipedia text ZPL preview via ZPLViewer.png|Wikipedia "label" as described in ZPL]]



Revision as of 21:17, 21 May 2020

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

Zebra Programming Language (ZPL) is a page description language from Zebra Technologies, used primarily for labeling applications. The original language was superseded by ZPL II, but it is not fully compatible with the older version. Meanwhile, ZPL II is emulated by many label printers of various producers.[citation needed]

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. A possible use of ZBI could be for when the Zebra printer receives a foreign label format, which it would then convert to ZPL II on the fly so it can be printed.[1]

Commands

The language commands always start with a caret ('^') or tilde 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 denoting the font size and spacing characteristics; ^ADN,18,10 is the smallest size and ^ADN,180,100 the largest.[citation needed]

Example

A simple output displaying the text "Wikipedia" can be made using code like below. <source style="width:350px;" lang="text"> ^XA ^LH30,6161 ^FO20,10 ^AXN,90,50 ^FDWikipedia^FS ^XZ </syntaxhighlight> Wikipedia "label" as described in ZPL

See also

References

  1. ^ "Zebra BASIC Interpreter 2.0". Zebra.com. Zebra Technologies. Retrieved 2020-03-26.
  2. ^ "ZPL II Programming Guide (vol. I)" (PDF). http://www.ptshome.com/: Portable Technology Solutions. p. 6. Archived from the original (PDF) on 2012-03-22. Retrieved 2011-04-14. {{cite web}}: External link in |location= (help)

External links