Background:
I send a lot of parcels out via various courier services. For this I use Zebra label printers, which use the industry standard ZPL printer language, which comes with CUPS.
The Zebra printers are excellent workhorses and as a result pretty expensive. I recently purchased a chinese knock off that accepts the ZPL protocol, so is ok as a poor mans's substitute, to a point.
If I have a .zpl file, which is what Amazon supplies to print a label, I can use this code on either brand printer:
Code: Select all
lpr -P LABEL -o raw file.zpl
Where LABEL is the name of the printer on my system, and file.zpl is the label file downloaded from Amazon. This is flawless on the good printers and the cheap knock of printer.
However, who uses zpl right? Nobody except amazon. PDF is the go for just about everything else. If I use any freight company's site to make labels, it generates a PDF file for labels. For the Zebra printers, I just click print from the browser and it prints fine. If I do the same with the chinese printer, nothing happens. In CUPS is just comes up with pending since, sometimes it loads to around 30%, but it never actually prints.
Ok, I figure that I'm not using the official driver, just the zebra driver which this printer is compatible with, it can't handle printing from Linux for anything that isn't just a raw print queue. Except, then I remember two things. The printer prints the test page perfectly from CUPS, with the little image of tux and all. Also, I've used it in the past to make stickers of fairies and unicorns etc for the kids, it prints from LibreOffice.
Hey, it prints from LO. Ok, drag the downloaded PDF file into LO and click print. Whoosh, away goes the printer. Printer prints PDF files. Except, from LO it prints them sideways. Instead of being 4 x 6" labels, it's trying to print them as 6 x 4" labels, ie in landscape rather than portrait.
Nothing can be changed to make them print the correct way around. It's super frustrating.
Now onto the technical questions....
If I delve into LO's settings, it has options of how to communicate with the printer. It defaults to "Printer Language Type: PDF". This doesn't make sense to me. If I send the PDF file directly to the printer, it won't print. If I click print from a PDF viewer (browser or evince) it won't print. If I print, using PDF from LO it does print (albeit in the wrong orientation). So my only thought is that LibreOffice's PDF printing is different to everyone else's PDF printing. Printing from LO using any of the PostScript levels does not work.
So I guess the question is why does LibreOffice print a PDF to this printer and nothing else does? What does it do differently?