Graphics and logos add a nice, professional touch to check-in labels. Here's how to add them to your own labels.

The steps we'll take:

  • Prepare an image
  • Embed it in your label code
  • Go a step further, and store images in your printers' memory

Prepare your image

You can use ZebraDesigner, but I'd suggest using Labelary instead:

1) Create (or locate) an image exactly the right size to print on your label. It will print dot-for-pixel, so if you want to print an inch-square image on a 203-dpi printer, it needs to be 203 x 203 pixels. A 4" x 2" inch label is about 812 dots wide and 406 dots tall. As far as format goes, Labelary claims to work with "a wide variety of formats". An image can't be resized by the printer (well, it can be, but only by integer multiples: doubled, tripled, etc.). I don't have any great suggestions for creating graphics that will print well other than to experiment.

2) We need to convert our image to a bitmap ".GRF" format usable by our printers. In the Labelary viewer window, delete the sample label code. Type ^XA, skip a couple lines, and type ^XZ. Put the cursor back between those two lines, and click the "Add Image" button. Locate the correct image on your computer. Labelary converts it and places the image code in the viewer window. Click the "Redraw" button and your image should display in the preview window. This gives you a pretty good sense of what it will look like when printed—this would be a good time to work on your image if it looks "unacceptable". You'll have several chances throughout this process to place it correctly on the label by adjusting the coordinates in the ^FO (Field Origin) command at the beginning of the graphic code (the origin is the upper left corner of a box containing the image).

Screen Shot 2018-03-21 at 8.24.21 AM.png

3) It's a good idea to test print the image. A quick way is to run the "Direct Communication" utility in Zebra Setup Utilities (click "Open Communication With Printer"). Copy and paste everything from the Labelary Viewer into the top window of the Direct Communication screen. Hit "F5" (or the "Send To Printer" button), and a label will print with your image where you placed it. If your image isn't complete (or nothing printed) you may not have copied everything. Try again.

Screen Shot 2018-03-21 at 8.51.03 AM.png

And here's our test label with the origin at 50,50:


4) Again, adjust the ^FOx,y coordinates to place the image roughly where you want it on the label. You'll make final adjustments in the next step in the Rock label editor. Keep hitting F5 to print test labels as you make adjustments.

When you're satisfied with your image...

Embed the image in your label

Open your label in the Rock label editor. Make a space in the middle for the new image, and copy and paste your final version (without the extra ^XA and ^XZ) directly into the code. With some exceptions, ZPL isn't sequential, so it's not critical where you paste your image (other than it has to be between the ^XA and ^XZ, and not in the middle of another line). You might try to keep the objects somewhat in top-to-bottom order for clarity's sake. Notice that pasting put the entire section on one line, extending way out to the right. It's OK if it pastes as a bunch of lines, too.

Screen Shot 2018-03-21 at 8.32.20 AM.png

Make sure the section or line with your image starts with ^FO. The ^GFA command works like this: Graphic Field Ascii, byte count, byte count, bytes per row, data. The "data" is a hex ASCII bitmap of the image.

You can hit the Redraw button in the Rock label editor and see a preview of the image on your label. Adjust its position if necessary with the ^FO coordinates. When you're satisfied, save the label. If you want to print a sample and test printing doesn't work from the label editor, you can always copy and paste the entire label back to the Direct Communication utility to see your final result.

Of course, you'll want to actually check someone in and see your stunning new label in all its glory.

Store the image on your printers

Storing the image on each printer isn't necessary, but it can cut down on network traffic if needed. For an easy way to do this (by simply checking someone in), check out this article: Downloading Logos or Images to Printers the Easy Way.

And here's the guide to all things ZPL.

Please contact me on the Rocket.Chat forum if you have questions or suggestions.