Suppress Ghostscript output comments from Adobe drivers

Paul Galbraith paul_galbraith at yahoo.com
Tue Sep 5 05:38:56 PDT 2006


I'm using cups 1.1 on OpenBSD with AFPL GhostScript 8.14 ... on my Windows machine I'm using Adobe's PS drivers, which apparently insert ps commands that cause ghostscript to output page numbers and info like this to stdout:

%%[ ProductName: AFPL Ghostscript ]%%
%%[Page: 1]%%
%%[LastPage]%%

Unfortunately when I try to print from Windows through Samba & CUPS, these comments are getting mixed into the output stream sent to my printer, which is not good.

I'd like to change the way cups executes gs, so that gs will output to a temp file, and stdout gets sent to /dev/null (to prevent the above useless comments from entering the print steam), and then the temp file can simply be sent to the printer.  Can cups be configured to do this, rather than piping gs output directly to the printer?

An alternative seems to come from here:

http://groups.google.ca/group/comp.lang.postscript/browse_frm/thread/d60d94ffcf634571/a82a811551d68e13?lnk=st&q=ghostscript+suppress+output&rnum=17#a82a811551d68e13

Basically, it sounds like I can add a short postscript code snippet to the ghostscript search path and get gs to execute it along with the standard print job (please excuse my lack of ps/gs knowledge!).  This seems easy enough, except that again I can't figure out how to alter the cups print command to process the new code library file AND the ps file with my print job, since cups pipes the print job directly to gs ...

Surely this must be a FAQ, but I'm afraid that after hours and hours of searching I can't find a way to do this with my limited understanding of cups and gs.  Can anyone help?  Thanks,

Paul




More information about the cups mailing list