I have a Zebra GK420d connect to OS X via CUPS. However, when I send files to it that are written in ZPL or EPL they are only printed in plain text.
Am I required to change to mode on the printer?
I have a Zebra GK420d connect to OS X via CUPS. However, when I send files to it that are written in ZPL or EPL they are only printed in plain text.
Am I required to change to mode on the printer?
Contrary to what others said, you don't need to specially add a raw queue.
Instead, you can submit raw files into any queue using
-o raw
switch:Printer name can be found over that link in CUPS:
This also works on other platforms that use CUPS, like Linux.
Thanks. I have looked at it some more. It seems that while using cups you cannot send raw ZPL commands to the printer. Like what I did was create the printer in cups as a socket and started a netcat listener on 9100 and then issued some sort of command to the printer
and this does not send the information to the printer, but I have seen on some forums that you have to use some form of language like C to parse the information
You would need to avoid any filtering. Print using a RAW filter, as configured in the CUPS interface, or by default in your
lpadmin
statement. You did not state how the printer was connected, but if IP, your destination would most-likely besocket://ip.addr.ess:9100
.You can create a raw CUPS queue with lpadmin. Here's the command line I used:
You can also set up a raw queue using the CUPS web admin at
This is a bit more comprehensive answer since I seem to be returning to this question every couple of years. To print with a Zebra or other barcode printers in Linux from command line follow these steps:
List all printer targets and find the printer you want to use:
Add new queue:
If your printing is slow (takes long to start), please make sure you added -o usb-unidir-default=true.
Check available queues:
Create a label (text file):
Create a file according to your printer's requirements in EPL (Zebra), ZPL (Zebra), EZPL (Godex).
Warning, certain CUPS versions might have an issue with raw files if they are under 512 bytes of length - longer files will print, while shorter will print once and then stall for a couple of minutes (looks like there is a timeout built in). A workaround is to add comments to extend it over 512 byte limit.
Example Zebra file (test.epl):
Example Godex file (test.ezpl):
Push to printer:
I am a PC guy so I don't know CUPS well, but I have used zpl and epl on PC's and found that they really like to get the raw print files. I always do a : filecopy "c:\zplfile.txt" "\computername\printershare" type command. I have used wordpad too, if I just want to do some text. But for labels and barcodes I would see if there is a way for you to send the raw zpl or epl to the printer port. Hope this helps.