Agility Labels - ZPL

Agility Labels - ZPL

ZPL

What is ZPL?

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!

Reference table

Zebra Language
Code
Name
Parameters
^XA
Label start
N/A
^XZ
Label End
N/A

^FO
Field over origin
Co-ordinates (X,Y)
^FD
Field data
Text, or data
^CF
Change font
Font code, font height
^BC
Barcode
Orientation, height, show barcode value, barcode value placement (top / bottom), mode
^FS
Field seperator
N/A
^BY
Barcode field data
Width, Width ratio, height
^FX
Comments
Text
^GB
Graphics box
Width, height, thickness

These are only the codes that are applicable to what we need, however find a full list of all codes and the parameters below.

Table with further explanations and parameters can be found here ;

Expected Parameters

Value
Code
Stock code
@STOCKCODE
Description@DESCRIPTION
Price
@PRICE
Casetype
@CASETYPE
Barcode@BARCODE

These are the codes that the program expects when it reads the template you created! It is case sensitive so do be careful!

Guide

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

  1. ^XA
  2. ^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

  1. ^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

  1. ^CF0,60

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.

  1. ^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.

  1. ^BY2,,100

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.

  1. ^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 ;

  1. ^FO0,100,^GB100,,0^FS

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!!
 
We will store them in this location
C:\Program Files (x86)\Adaptive Accounting Limited\AgilityLabels\ZPLTemplates\Backup
Simply copy and paste the files into the ZPLTemplate folder and you should be ready to use the standard templates again!
If you have any questions or queries regarding ZPL, or need help making a bespoke template. Please contact our helpdesk
    • Related Articles

    • Labels App

      Labels App Welcome to the new Agility Assistant Labels App. In this article, we hope to guide you on printing labels, pairing printers and all the other features we have included in the app. Pairing the Printer 1. Make sure the Android device has ...
    • Agility Labels

      Agility Labels Welcome to the new and improved Agility Labels. Whats new? : Well except from the obvious facelift, we heard your requests and suggestions and we listened! We payed extra attention to the part that matters most to you, the looks and ...
    • STOCK - Shelf Label Printing

      Agility Labels is Moving! We aren't going far though! Please head to the new "Agility Labels" guide to learn more! INTRODUCTION In many stores the printing of shelf labels is required and Agility has a built in shelf label printer. This article will ...
    • Agility Pro Already Running

      If this message appears when trying to open Agility Pro: Right mouse click on the taskbar, and then select Task Manager from the list: (If you are running Windows 11, right mouse click on the Start button and then select Task Manager) If Task manager ...
    • Change Label Type - Zebra Desktop Printer

      To switch between different label types for a Zebra Desktop, start by opening the Zebra Setup Utilities on the PC that the printer is connected to: Once open, make sure the printer is highlighted and then click Configure Printer Settings: Make sure ...