Jump to content

Zebra Programming Language: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Citations go immediately after punctuation per MOS:REFPUNCT. Websites aren't publishers; they are works of publishers.
Removing link(s) to "Eltron Programming Language": Removing links to deleted page Eltron Programming Language.
 
(28 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{Short description|Specialized computer programming language}}
{{about-distinguish-text|the language typically used with printers|[[Z-level programming language]] used in high performance computing}}
{{Infobox programming language
{{Infobox programming language
| title = Zebra Programming Language
| title = Zebra Programming Language
Line 5: Line 7:
| operating system = independent
| operating system = independent
| influenced by = ANSI [[BASIC]]
| influenced by = ANSI [[BASIC]]
| developer = Zebra Technologies
| developer = [[Zebra Technologies]]
}}
}}


'''Zebra Programming Language''' ('''ZPL''') is a [[page description language]] from [[Zebra Technologies]], used primarily for [[label]]ing 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.
'''Zebra Programming Language''' ('''ZPL''') is a [[page description language]] from [[Zebra Technologies]], used primarily for [[label]]ing applications. The original language was superseded by '''ZPL II''', but it is not fully compatible with the older version. ZPL II is supported by some non-Zebra label printers.<ref>{{Cite web |title=ColorWorks CW-C6500A Color Inkjet Label Printer with Auto Cutter (Matte) |author= |website=Epson |date= |access-date=31 July 2021 |url= https://epson.com/For-Work/Printers/Label/ColorWorks-CW-C6500A-Color-Inkjet-Label-Printer-with-Auto-Cutter-%28Matte%29/p/C31CH77A9981 |quote=Compatible with ZPL II }}</ref><ref>{{Cite web |title=cab printers support ZPL II |author= |website=cab.de |date=November 2020 |url= https://www.cab.de/en/news/news/cab-zpl/}}</ref>


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.<ref>{{cite web|url=https://www.zebra.com/gb/en/products-services/software/zebralink/zebra-basic-interpreter2.html |title=Zebra Basic Interpreter 2.0 |publisher=[[Zebra Technologies]] |website=Zebra.com |accessdate=2020-03-26}}</ref>
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.<ref>{{cite web|url=https://www.zebra.com/gb/en/products-services/software/zebralink/zebra-basic-interpreter2.html |title=Zebra BASIC Interpreter 2.0 |publisher=[[Zebra Technologies]] |website=Zebra.com |access-date=2020-03-26}}</ref>

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


==Commands==
==Commands==
The language commands always start with a caret ('<code>^</code>') or tilde sign ('<code>~</code>'). Currently, more than 170 commands exist in ZPL II. Each format has to start with the command <code>^XA</code> and end with <code>^XZ</code>.<ref>{{cite web|url=http://www.ptshome.com/kb/Manuals/ZPL_Vol1.pdf|archive-url=https://web.archive.org/web/20120322181734/http://www.ptshome.com/kb/Manuals/ZPL_Vol1.pdf|url-status=dead|archive-date=2012-03-22|title=ZPL II Programming Guide (vol. I)|publisher=Portable Technology Solutions|location=http://www.ptshome.com/|page=6|accessdate=2011-04-14}}</ref> For instance, the font size is sent to the printer with the <code>^ADN,n,m</code> command, where <code>n</code> and <code>m</code> are integers denoting the font size and spacing characteristics; <code>^ADN,18,10</code> is the smallest size and <code>^ADN,180,100</code> the largest.
The language commands always start with a caret ('<code>^</code>') or tilde sign ('<code>~</code>'). ZPL II has more than 170 commands. Each format has to start with the command <code>^XA</code> and end with <code>^XZ</code>.<ref>{{cite web|url=http://www.ptshome.com/kb/Manuals/ZPL_Vol1.pdf|archive-url=https://web.archive.org/web/20120322181734/http://www.ptshome.com/kb/Manuals/ZPL_Vol1.pdf|url-status=dead|archive-date=2012-03-22|title=ZPL II Programming Guide (vol. I)|year=2005|website=Portable Technology Solutions|page=6}}</ref> For instance, the font size is sent to the printer with the <code>^ADN,n,m</code> command, where <code>n</code> and <code>m</code> are integers denoting the font size and spacing characteristics; <code>^ADN,18,10</code> is the smallest size and <code>^ADN,180,100</code> the largest.{{Citation needed|date=March 2020}}


The following is a complete example of a ZPL document for a product label:
===Example===
<pre>
A simple output displaying the text "Wikipedia" can be made using code like below.
<source style="width:350px;" lang="text">
^XA
^XA
^CF0,30
^LH30,6161
^FO300,30^FDHU Label^FS
^FO20,10
^CF0,25
^ADN,90,50
^FO20,100^FDHU ID: 112345678000001107^FS
^FDWikipedia^FS
^BY2.2,3,70
^FO20,130^BCN,,N^FD112345678000001107^FS
^FO20,230^FD60-Volt Cordless Electric Hedge Trimmer^FS
^FO20,260^FD13^FS
^FO650,200^BQN,2,5^FDQA,^FS
^XZ
^XZ
</source>
</pre>

[[File:Wikipedia text ZPL preview via ZPLViewer.png|Wikipedia "label" as described in ZPL]]
==See also==
* Eltron Programming Language (EPL)


==References==
==References==
Line 36: Line 42:
* [http://www.tracerplus.com/kb/Manuals/ZPL_Vol1.pdf ZPL II Programming Guide (vol. I)]
* [http://www.tracerplus.com/kb/Manuals/ZPL_Vol1.pdf ZPL II Programming Guide (vol. I)]
* [http://www.tracerplus.com/kb/Manuals/ZPL_Vol2.pdf ZPL II Programming Guide (vol. II)]
* [http://www.tracerplus.com/kb/Manuals/ZPL_Vol2.pdf ZPL II Programming Guide (vol. II)]
* [http://labelary.com/viewer.html Online ZPL Viewer] from Labelary
* [http://zplviewer.sourceforge.net/ ZPLViewer]
* [http://labelary.com/viewer.html Online ZPL Emulator]


[[Category:Page description languages]]
[[Category:Page description languages]]

Latest revision as of 20:52, 20 July 2024

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. ZPL II is supported by some non-Zebra label printers.[1][2]

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.[3]

Commands

[edit]

The language commands always start with a caret ('^') or tilde sign ('~'). ZPL II has more than 170 commands. Each format has to start with the command ^XA and end with ^XZ.[4] 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]

The following is a complete example of a ZPL document for a product label:

^XA
^CF0,30
^FO300,30^FDHU  Label^FS
^CF0,25
^FO20,100^FDHU ID:         112345678000001107^FS
^BY2.2,3,70
^FO20,130^BCN,,N^FD112345678000001107^FS
^FO20,230^FD60-Volt Cordless Electric Hedge Trimmer^FS
^FO20,260^FD13^FS
^FO650,200^BQN,2,5^FDQA,^FS
^XZ

See also

[edit]
  • Eltron Programming Language (EPL)

References

[edit]
  1. ^ "ColorWorks CW-C6500A Color Inkjet Label Printer with Auto Cutter (Matte)". Epson. Retrieved 31 July 2021. Compatible with ZPL II
  2. ^ "cab printers support ZPL II". cab.de. November 2020.
  3. ^ "Zebra BASIC Interpreter 2.0". Zebra.com. Zebra Technologies. Retrieved 2020-03-26.
  4. ^ "ZPL II Programming Guide (vol. I)" (PDF). Portable Technology Solutions. 2005. p. 6. Archived from the original (PDF) on 2012-03-22.
[edit]