1. A driver rendered the code as a document
The most common cause, and the easiest to confirm. Opening the .zpl or .txt in Notepad and pressing Print, or printing it from any application, sends it through the Windows driver. A driver's job is to turn a document into a picture of that document, so the printer receives an image of your ZPL as text, and prints exactly that.
Zebra's own application note on this symptom says the same about its ZDesigner driver: ZPL embedded in a job sent through it comes out as printed commands. The file has to reach the printer raw, without a driver reformatting it.
- Install a second queue for the same printer using the Generic / Text Only driver, and send ZPL to that one. It passes bytes through untouched.
- Or share the printer and copy the file straight to it: copy /b label.zpl \\localhost\ZebraShare
- Or, for a networked Zebra, send the file to TCP port 9100, which takes raw ZPL with no driver at all.
2. The printer is set to another language
Many Zebras speak more than one language, ZPL, EPL and, on mobile models, CPCL or line print, and only interpret the ones their device.languages setting allows. A printer left in line_print mode prints whatever it receives as plain text, so ZPL comes out as characters.
Ask it: send ! U1 getvar "device.languages" through a raw connection (Zebra Setup Utilities has a send-command box). If the answer is line_print or epl, set it with ! U1 setvar "device.languages" "zpl", followed by a line break. Zebra's support article on enabling ZPL also tells you to recalibrate the media afterwards (~JC).
3. The printer is in diagnostic mode
Communications diagnostics, sometimes called dump mode, makes a Zebra print every byte it receives, as text and hex, instead of acting on it. It exists for exactly this kind of troubleshooting, so the output looks like your ZPL with extra characters around it.
The ZPL command ~JD switches it on and ~JE switches it off, and the setting survives a power cycle. If somebody ran a diagnostic and never sent ~JE, every later job prints this way. Send ~JE through a raw connection.
4. The file is not raw ZPL
Carrier APIs rarely hand you the bytes directly. UPS, for one, returns the label inside a JSON response as base64, and a string of base64 sent to a printer is just text. Decode it first. If the file starts with ^XA once decoded, that decoded output is what the printer wants.
The other version of this is a file in Zebra's older language, EPL, which starts with a line like N or q812 rather than ^XA. A ZPL-only printer prints that as text too. The ZPL vs EPL page shows how to tell them apart from the first lines.
When the printer is not the point
If you only need the label on paper and the Zebra is in another building, or the printer is not a Zebra at all, convert the file to a PDF here and print that at 100% scale on anything. The conversion runs in this tab, and the file is not uploaded.