Daily Archives: May 2, 2008

Printing DHL Postage Stamps on gutsy

Been pulling my hair again …

Why do I need to use strace just to print a postage stamp? “Ah yes,” I virtually hear a colleague say, “that is because you use such a tinker OS.” Hrmpf …

WARNING: Don’t hit the real print button before having done a successful test print!

Just in case you want to keep your hair: If you try to print a PDF document from a JavaScript button inside a form you might get a message “lp: The printer or class was not found”, or in German (as DHL uses this in its online postage service) “lp: Drucker oder Klasse wurde nicht gefunden.” Your first attempt should prolly be to check whether you actually do have a printer called lp. This is already a brain-dead assumption, but oh well. So, try this:

sudo lpadmin -p <name-of-your-printer-queue> -c lp
sudo lpadmin -E -d lp

Try your test-print again. If it still doesn’t work, you may be in the same situation as I was, i. e. acroread complains about not finding printer “lp” but doesn’t actually try to print to “lp” (and the “lp” in the error message may only be referring to the command line tool) but to “undefined”. I haven’t yet had the nerve to find out why that is, but this fixes printing, then:

sudo lpadmin -p <name-of-your-printer-queue> -c undefined
sudo lpadmin -E -d undefined