Comparison
Raw ZPL or zeepler?
ZPL is a plain-text language, and plenty of teams write it by hand. Here is one label both ways, and an honest account of when each is the better choice.
The label in raw ZPL
A 3 × 1 inch asset tag: a department, a location and a Code 128 barcode of the asset number.
^XA
^PW609
^LL203
^CF0,28
^FO20,15^FDPUBLIC WORKS^FS
^CF0,24
^FO20,50^FDYARD-3^FS
^BY2,2,59
^FO20,85^BCN,,N,N,N,A^FDAST-88213^FS
^XZ^PW609and^LL203set the label to 3 × 1 inches at 203 dpi.^CFsets the font for the fields after it, and^FOplaces each one, in dots from the top-left corner.^BYsets the barcode's module width and height, and^BCprints the Code 128 barcode.
To print a different asset, your code puts new values between ^FD and ^FS. That is where most of the work turns out to be: a value with a ^ or ~ in it is read as a command, and a value that is too long runs off the label without an error.
The same label with zeepler
Send this body to POST https://api.zeepler.com/v1/zeeplify with your API key in the x-api-key header. It is a working request, not an illustration: on every change, our tests run this same file through the API's code and compare the result with the ZPL below.
1{2 "config": {3 "size": "3x1"4 },5 "data": {6 "asset": "AST-88213",7 "dept": "PUBLIC WORKS",8 "location": "YARD-3"9 },10 "templates": [11 {12 "type": "Text",13 "dataPath": "dept",14 "coords": [20, 15],15 "font": "0,28",16 "maxLength": 2017 },18 {19 "type": "Text",20 "dataPath": "location",21 "coords": [20, 50],22 "font": "0,24"23 },24 {25 "type": "BarCode",26 "dataPath": "asset",27 "coords": [20, 85],28 "style": "code128"29 }30 ]31}And the ZPL that comes back, ready to send to the printer:
^XA^MCY^XZ
^XA
^SZ2
^MMT
^MNY
^LL203
^PW609
^LH0,0
^CF0,28^FO20,15^FDPUBLIC WORKS^FS
^CF0,24^FO20,50^FDYARD-3^FS
^BY2,2,59^FO20,85^BCN,,N,N,N,A^FDAST-88213^FS
^XZThe layout and the data are separate, so the same body works for every asset. zeepler escapes ^, ~ and _ in the data, cuts text at maxLength when you set it, and refuses a body with a field that starts outside the label, naming the field, before anything reaches a printer. A field that starts inside and runs past the edge is still yours to catch, as it is in raw ZPL.
When raw ZPL is the better choice
- Your labels rarely change, and someone on the team already knows ZPL. A fixed label with a few values swapped in is a short template, and it costs nothing per label.
- You need a command zeepler does not have yet. It makes text, Code 128, Code 93, EAN-13 and QR codes on 3 × 1 and 4 × 2 inch labels at 203 dpi. Wrapped text (
^FB), boxes and lines (^GB), images (^GF), rotation and 300 dpi printers all mean writing ZPL yourself, for now. - The printer cannot reach the internet, or the data must not leave your network. zeepler is an API: each label is one HTTPS call.
- You print in volume at high speed and want no network call in the path. Generating ZPL in your own code takes no round trip.
When zeepler helps
- The data lives in your system, and you would rather send it as JSON than maintain ZPL strings.
- The values come from people or other systems, so escaping and length limits matter.
- You want a mistake caught before it prints: every problem with a request comes back in one
400, each with the path of the field. - Several systems or teams print the same label, and you want one definition of it.
Other comparisons
- zeepler and Labelary: Labelary turns ZPL into images; zeepler turns your data into ZPL. What each does, and when you would use both.
Help with an integration
Email info@zeepler.com. You will get a reply within 2 business days. The support policy covers response times and version changes.