[plug] using CUPS & netatalk to do mac printer spooling

Craig Ringer craig at postnewspapers.com.au
Tue Oct 21 15:23:06 WST 2003


Hi folks

I'm hoping somebody has some ideas on another bit of fun that's stumping 
me here. Google has been of zero help so far :-( so I'm hoping someone 
here with the misfortune to run a MacOS 9 network has seen this. Sorry 
I'm suddenly popping up and asking long, complicated questions - but 
I've been having a bad run here and was really hoping someone on [plug] 
might have some ideas. Next stop will the the CUPS list.

I'm currently trying to get MacOS 9 machines to print via a CUPS print 
spooler using netatalk. Macs have the lovely habit of opening up a 
connection to the printer, doing any processing needed at their (slow) 
leasure, then outputting the job - tying up the printer for ages. Just 
to make life more fun, they often forget to close the connection 
afterwards, so the printer just quietly waits and doesn't accept any 
more jobs via appletalk.

Due to this crap-tacular setup, I'm trying to get the macs to print via 
a less-braindead spooler that can handle their eccentiricities. (Yes, 
I'm a little frustrated with these machines...). CUPS would seem to fit 
the bill, as I've found it very good in general.

Unfortunately, whenever any of the macs print via the print spooler, the 
printer spews endless reams of complete gibberish. If I set the CUPS 
printer they use to point to 'socket://localhost:9100' (jetdirect 
printing) and use 'nc -l -p 9100 > /tmp/pscapture.ps' then print from 
one of the macs, the resulting PostScript file /looks/ OK. GhostScript 
can display it fine, or convert it to a PDF as well as it ever can.

If I then cat that file to the printer, the printer spews gibberish. 
This happens with both our Xerox DocuPrint 4200 and the HP 4MV, so it's 
not a printer-specific PostScript bug.

Direct printing from the macs comes out fine, but of course I can't see 
what they're doing differently.

If I create a printer on the mac using the desktop printer utility, and 
aim it at the CUPS lpd compatable queue (MacOS 9 supports lpr - 
amazingly) I get exactly the same results.

The macs use the AdobePS print driver, and output is coming from 
QuarkXPress 4. To make things more complicated, simple jobs from the 
SimpleText editor built into the macs work fine, as does output from 
PictureViewer. Both Photoshop (7) and QuarkXPress (4.1.1) cause the 
printer to spew gibberish, however.

Interestingly, sometimes running 'ps2ps' over the captured postscript 
file before sending it to the printer allows it to print fine. I've also 
had it horribly corrupt an image at least once - sort of like the image 
was painted onto a cylender made of rings, and the rings had been 
twisted around, wrapping bits of the image back to the other side, etc. 
The 3 different colour layers had wrapped at different "rates", too. 
Seriously mangled.

Converting the PostScript files to UNIX linefeeds before sending does 
not help.

So - it's not a netatalk problem (as I can bypass that using direct lpr 
printing from the macs), it doesn't appear to affect GhostScript's 
understanding of the PostScript, and only documents from some apps cause 
a problem. The apps I need, of course. PostScript level (1/2/3) setting 
changes nothing, and setting ASCII output has no effect. There is no 
change if font embedding is on or off. The macs are using the 
vendor-supplied PPD for the printer, the same one they print directly 
with. CUPS is doing the same, and prints fine using it from all my UNIX 
apps. Using a raw queue in CUPS makes no difference.

The only alternative here is spooling via the NT4 server, and I /really/ 
don't want to do that. The NT has enough troubles as it is.

The only output I've seen from the printer is this:
%%[ status: busy; source: Other I/O ]%%
%%[ status: busy; source: Other I/O ]%%
%%[ status: busy; source: Other I/O ]%%
%%[ status: busy; source: Other I/O ]%%
%%[ status: busy; source: Other I/O ]%%
%%[ status: busy; source: Other I/O ]%%
%%[ status: busy; source: Other I/O ]%%
%%[ Error: undefinedresult; OffendingCommand: image ]%%

from at least one of the Photoshop jobs, and this:

%%[ Error: invalidcommand; OffendingCommand: | ]%%

from at least one of the Quark jobs. Not too helpful, really. I've 
always LOATHED the way PostScript errors don't give line numbers or context.

So... any ideas would be appreciated, especially from anybody who has 
been dealing with macs for a while. Oh - they're using the latest 
AdobePS driver and running MacOS 9.2.2, printing to CUPS 1.1.19 (I've 
tried the RH8-supplied 1.1.17 as well - same result).

Craig Ringer


_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list