Printing PostScript from Win2000 clients (and possibly WinXP)

David Härdeman david at 2gen.com
Wed Feb 6 12:46:19 GMT 2002


Hi,

I've had some problems when printing in color from Win2000 clients to my Samba server. I installed the printer driver thats first in the list of Apple printers (Apple Color LW 12/660 PS) on the client and verified that Samba got a PS file when printing.

The problem though, was that I wanted the PS files to be transformed from PS -> pnm format (so that they could be used with the pnm2ppa application for my lousy 820Cxi printer), sometimes the pnm file output was corrupted. It didn't happen (as far as I could tell) with clients earlier than Win2000. 

After some trial and error I discovered that Win2000 seemed to produce a PS format that GhostScript (version 6.51) didn't really like, and the solution was to pass it trough GhostScript twice. 

So instead of having a filter like this:
/usr/bin/gs -sDEVICE=ppmraw -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=- -

I had a filter like this:
/usr/bin/gs -sDEVICE=pswrite -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=- - | \
/usr/bin/gs -sDEVICE=ppmraw -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=-

Which corrected all the problems I could see in the PS generated by Win2000. Now this isn't really a problem that Samba should deal with (GhostScript should be able to correct the PS in one sweep), but I thought it could be nice to add somewhere to the documentation that this trick might do it if recent versions of Windows produce bad PS.

HTH. Regards,
David Härdeman
david at 2gen.com




More information about the samba-docs mailing list