You
may have noticed the new menu on your Agility Labels app! ZPL or Zebra
Printing Language, is the language that Zebra themselves created to
allow software to communicate with their computers.
In this guide I hope to inform you on how to write ZPL, what our program anticipates as a placeholder and much more!
Lets
begin, Please open the following link.
Once that's open you'll be greeted with a preview of what a label can look like.
Lets begin making our own. Clear that code and put the following fields. These are essential for anything to display
- ^XA
- ^XZ
This
defines the start and end of a label. Once that's down lets move to our
next step. Printing, a classic. It's the perfect place to start
learning any language. We will use something called Field over origin.
Which is a fancy way of saying a data field at these coordinates. Use
the following code below to make your first print statement
- ^FO^0,0^FDHello World!^FS
Great!
You've made your first print statement. But.. it's a little hard to
read isnt it? Well we can fix that very easily using a change font
command, we can change font and font size with it. Put the following
code ABOVE your print statement. This goes with any field data changing
statement as you cannot change something after it has been closed with
^FS
This
will increase the font to 60 units. If you're wondering what the first digit on that line defines, It changes the font.
One of the most important things we deal with is barcodes. Lucky for us zebra will handle most if
not all of the barcode font etc. So we need to use the following command
to print a barcode with a text field as a parameter.
- ^FO0,150,^BC^FDHello Again!
This
will create a barcode underneath your hello world. By default it will
show you the value of the barcode however we can easily hide that if
space is an issue. However, notice how the barcode is a little thin?
Might give us troubles scanning it. This is another easy fix. Similar to
before, put this code before to change the height of our barcode.
This
will increase the height of our barcode to 100 units. If thats too big,
knock it down to 50. There are ways however to change the dimensions
of your barcode, this is also how we're going to achieve the effects I
described above. Deleted the last 2 lines you just copied in so it's
just your hello world and paste the following code in.
- ^FO0,150^BCN,100,Y,Y,N,N,^FDHello Again!
Notice how it didn't go away but just moved above?
Task :
Change the barcode code to hide the actual barcode value
If
you get stuck on this, use the above reference table, additionally don't be afraid of Google!
Once you've finished that, Put this code below your barcode ;
This
will draw a simple line, go ahead and mess around with it and
manipulate it to whatever you want. Use the reference table if the
parameters might be a bit confusing.
Congratulations!
You've made your very first ZPL label. We think you're more than ready
to begin making your own templates that will work with the Agility
Labels program!
To Start, head to the ZPL
area on your application, open a label template you wish to overwrite
and start testing code! If at any point you need to get a backup of the
old labels because you wish to revert back, No Worries! We've placed an
archive folder with a backup of each template, please be sure to only
copy and paste them NEVER move them!!