Question

I'm just getting started with direct printing via ZPL and am currently connecting to the printer via a TCP socket, using PHP.

Whenever I print a label, whether via the script I've written, or using the Windows based Zebra Configuration client, the printer advances ~8 labels, then prints.

The ZPL I'm using to print the label is below:

^XA
^FO50,50
^ADN,36,20
^FDFront Shelf-2^FS
^XZ

Since I've had the same results from the configuration app, and via TCP socket, I'm a little stumped.

I have configured the printer (a QLn220) with the correct label size (50mm x 40mm).

I would like some suggestions on how to find out what is causing these extra labels to feed when I print.

Was it helpful?

Solution

It looks like the problem I was having was due to printer calibration.

With a bit of help from a friendly dev at Zebra (Hi, Chip!) I licked the "too many labels feed" problem.

The solution was to calibrate the printer ~JC, then save the settings ^JUS.
The ~JC command is used to "Set Media Calibration" and will "force a label length measurement".
Since I'm using black bar media, I don't have to specify the physical size of the labels (Unless someone can correct that), and the printer handles that all by itself.

The entire ZPL document/file that solved my problem is here:

~JC
^XA
^JUS
^XZ

Now everything works as I expected it to. For now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top