Basic ZPL Exercises and Examples

Basic ZPL Exercises and Examples

The purpose of these exercises is to introduce basic ZPL commands to novice ZPL users.

Make sure this checklist is complete

  • Load the printer with labels that are big enough to give you ample space to work with.
  • Print a configuration label.
  • Look at the configuration label and make sure that the
    LEFT POSITION
    is set to
    000
    and
    LABEL TOP
    is set to
    000
    .
  • Determine the printer’s resolution. It is listed on the configuration label. 8/MM
    =
    200 dpi,
    12/MM =
    300 dpi and
    24/MM =
    600 dpi.

Tips

These are some tips when using ZPL:
  • Use the DOS text editor to write ZPL files.
  • Save the file as a .
    txt
    file and copy it to the printer from DOS command line.

Before You Begin

Some things that are important to understand before you begin are:
  • 200 dpi means the resolution of the printhead is 200 dots per inch. If you program the printer to draw a line 100 dots long that equals a half inch. 100 dots on a 300 dpi printer prints a line 1/3 inch long.
  • The home position that all your coordinates are referencing is at the left-hand trailing edge of the label as the label comes out of the printer. (There are some exceptions to this.)

Exercises

The exercises start simple and gradually progress to give you an opportunity to try a variety of commonly used ZPL commands. Not all commands are covered, but this should be a good core of commands to learn. Some commands may not be supported due to the firmware version in your printer.