Somewhere in June 2009, I became self-employed. Since it involves sending invoices, I decided to create a template with OpenOffice. After creating a new invoice, I export it as PDF and email it to the customer. Saves me paper, ink, envelopes, stamps, trips to the post office, fuel, ... You get the picture.
Unfortunately I still have to hand them in to my bookkeeping office on paper, so I still have to print them once. Which is what I've been doing since June 2009. Until I tried printing invoices from Q4 2009, somewhere in December. The printer refused to print anything.
As usual, the CUPS logs weren't helpful. So I removed the printer from CUPS, and added it again, via http://localhost:631/. Tried to print an invoice, but it failed. Added the printer with the "hp-setup" tool from HPLIP, and had it print a test page, which came out fine. At first I thought the problem was solved, until I sent another invoice to the printer. For every printed pages, two pages came out of the printer. The first one empty, the second one containing the text below:
PCL XL error
Subsystem: KERNEL
Error: IllegalAttributeValue
Operator: SetColorSpace
Position: 5
Since it complained about SetColorSpace, I tried switching from Color to GrayScale, but the problem remained. Power-cycled the printer, reset it to factory settings, changed some of the printer's other settings, but nothing helped to fix the problem. I even booted into Windows 7, only to figure out that HP had stopped creating drivers for the device, and that there were no Windows 7 drivers available. In the HP support forums I found some way to install the XP or Vista driver for that printer in Windows 7, but I didn't even feel like trying. So I ended up putting an Ubuntu 9.10 live cd into one of my spare machines, added the printer there, scp'd my invoices, printed them. Ugly workaround, but at least it worked. Now, 3 months later, I ran into the same problem. Unmasked the latest available versions of CUPS, foomatic*, hplip, and dependencies, ran "emerge -uND world", deleted the printer, added it via http://localhost:631/ --> fail, added it via hp-setup, test-page -> OK, PDF -> fail. PCL XL error, FFS! Completely removed anything with cups, print, foomatic in its name, reinstalled, ran revdep-rebuild. Same problem. Emerged gutenprint, foomatic-db-ppds, tried to select the old hplip driver, or even the pxljr driver that was listed in the printer models list on http://localhost:631/, and for those driver CUPS complained that it couldn't find the PPD? I fail to see the reason for showing a type of printer in that list when there isn't a PPD available for it. WTH?! Being completely fed up with this stupid issue, I powered on my Fedora 13 Alpha testing machine, let it do its updates first, opened the CUPS configuration webpage, added the printer, scp'd my invoices, printed them. And it worked there as well. Great, so the problem is Gentoo specific. I kinda promised myself to stop using Gentoo if this proved to be a Gentoo issue again. These kind of issues are very bad for productivity, I wasted another three hours today on trying to get my desktop to print any PDF's on the CLJ3600... Being still convinced that there isn't any other Linux distribution as flexible as Gentoo, I decided to continue trying to fix the issue on my Gentoo system. Compared both printers.conf and immediately noticed the one on the F13 system contained some extra lines at the end:
Attribute marker-colors \#000000,#00FFFF,#FF00FF,#FFFF00
Attribute marker-levels 93,55,61,63
Attribute marker-names Black Cartridge HP Q6470A,Cyan Cartridge HP Q6471A,Magenta Cartridge HP Q6473A,Yellow Cartridge HP Q6472A
Attribute marker-types tonerCartridge,tonerCartridge,tonerCartridge,tonerCartridge
Attribute marker-change-time 1269339349
Stopped CUPS, edited the printers.conf on my Gentoo system, started CUPS again, printed PDF, saw it worked, jumped for joy. I retried deleting the printer and adding it again on my Gentoo system, in various ways, but those Attribute lines are never added to the printers.conf. So this problably means there is a bug in the hplip package on Gentoo, or the bug is upstream and Ubuntu and Fedora fixed it without caring enough to get the fix upstream. When I figure that out, I'll submit a bugreport on the appropriate bugtracker. For today however, I've had it with debugging printer issues.