So, every time I upgrade my system, it seems like my printers break. I don’t know if it’s bad management of the cups debian packages, the peculiarity of windows, or my own incompetence. The breaks have wildly varying symptoms. So, I haven’t seen a pattern in them that allows me to fix things gracefully. Sometimes Samba is to blame. Sometimes CUPS (-PDF) is to blame. And sometimes Windows is to blame. Well, when I upgraded from Lenny to Squeeze awhile back, of course it broke my virtual PDF printer that I use to generate electronic invoices. When I’d try to connect to the printer (as configured in Lenny), I got the following error:
Windows cannot connect to the printer. Operation
could not be completed (error 0×0000000d).
(No, it wasn’t in those colors or with that background… but I figured I’d try to find a way to make you, dear reader, feel as annoyed as I felt when I saw the error.) Anyway, with such a wonderfully informative error, I didn’t know quite where to turn. The logs (cups, samba, auth.log, syslog, etc.) on the server gave no indication that anyone had tried to connect. And I could browse the other shares from the vista machine nicely and those connections did show up in the logs. So, I had a strong indicator that the problem was NOT my upgrade from Lenny to Squeeze. But, being the stubborn idiot that I am, I started fiddling around with the printer and samba configs anyway…. which lead nowhere, of course. The upside is that I am just a smidgeon more familiar with cups and samba. [sigh]
When I finally typed the error into a search engine, I found the answer provided by some participants of Microsoft TechNet, which I repeat here for posterity:
From: AHarsent
I've seen this problem with a few printers now, not
consistantly[sic] between any particular makes or
models. However, I have found a consistant[sic]
fix to connect to any network printer from vista:
Run a command prompt and type the following:
net use LPT2: \\servername\printer
This sets up a behind-the-scenes connection to
the printer.
Then go through the add printer wizard, choose to
add a local printer, and choose port LPT2… It will
probably ask for a printer driver, and you can just
choose whatever XP driver you might have been using
before. The printer is then installed without any errors,
and works just fine.
Of course, since I’m using CUPS-PDF, I don’t have a printer driver. I just use the Generic MS Publisher Imagesetter, which seems to work nicely. And now that I’ve made the right sacrifices to the right gods, I’m back to being able to generate PDFs from any program on the windows machine.