Document Template Placeholders - Purchase Order Product ZPL Label
Table of Contents
Purpose
ZPL Labels are now customisable within CartonCloud Templates. Go to 'Document Templates' and download the default sample zpl file.
Once the ZPL template is downloaded use a text editor to view the ZPL. Example ATOM https://atom.io/
To redesign the ZPL labels use the Labelary Online ZPL Viewer http://labelary.com/viewer.html
Once the label has been redesigned extract the ZPL file from Labelary & upload into CartonCloud ZPL Label Template
Document Template Placeholders and ZPL code information can be found here Document Template Placeholders
Getting Started with ZPL Code
In order to draw text on your label, you need to create a "field", e.g. ^FDProduct Name:^FS.
The field contains only the visible text (Product Name) and is preceded by configuration commands. Let's take a look at this code:
Example ZPL Code
^XA^FO 15,15^A 0,N,45,45^FDProduct Name:^FS^XZ
The tags below explain the label configuration commands:
|
Tag |
Description |
|
^XA |
Start of the label. Mandatory. |
|
^FO x,y |
Field Origin. Sets the top-left corner of the invisible box containing the text. x - horizontal portion of the coordinate. y - vertical portion of the coordinate e.g. ^FO30,15 corresponds to a point 15 down and 30 across from the top-left corner of the label. |
|
A fo,h,w |
Sets the font for the following field. f - "name" of the font (accepts values a-z or 0-9). (limited ZPL accepted fonts) o - orientation of the text. (accepts N=normal, I=Inverted, D=inverted and reversed, R=reversed) h - height of the text. w - character width of the text. e.g. A0N,45,45 sets the text to font 0, Normal orientation, height 45, width 45. |
|
^FD data |
Field Data. Used at the beginning of the line to indicate the printable the characters. data - text to print on the label (e.g. Product Name) |
|
^FS |
Field Separator. Used at the end of the line to indicate the end of the printable characters. |
|
^XZ |
End of the label. Mandatory. |
For more information and a list of available commands, you can find the ZPL command documentation here. There is also a ZPL viewer at labelary.com, and they have a more concise list of available commands available here.
Modifiers
There are some modifiers which are specific to ZPL templates:
|
Modifier |
Example |
Notes |
|
REVERSE |
$PRODUCT_TYPE_NAME:REVERSE$ "General" becomes "lareneG" |
Reverses the value for right-aligned text. |
|
SUFFIX |
$HEADER_VAL_1:SUFFIX" - "$ "Batch Number" becomes "Batch Number - " |
Adds the given text to the end of the value. |
|
PREFIX |
$HEADER_VAL _1:PREFIX"> "$ "Batch Number" becomes "> Batch Number" |
Adds the given text to the start of the value |
|
BC39 |
$POP_LABEL_ID:BC39$ |
Draws a code 39 barcode. |
|
BC128 |
$POP_LABEL_ID:BC128$ | Draws a code 128 barcode. |