Subject: Re: GhostScript, samba, and that "other" OS.
To: None <netbsd-help@netbsd.org>
From: Richard Rauch <rkr@olib.org>
List: netbsd-help
Date: 01/15/2004 06:52:11
Hm.  Here's the tail end of the PostScript file:

%%Pages: 6
(%%[ LastPage ]%%)  =
%%EOF

...that from printing an HTML file from Explorer.

Removing the page-number lines that look like that fixes the
problem.  (I also removed some HP print job control lines, or
what I took to be such; not sure if those are affecting things
or not.)

My guess is that those lines will make some printers display
the current page number, but apparently GhostScript ends up just
dumping them into the output stream.  Which is also where GhostScript
is told to dump the PCL data from converting PostScript graphics
to what my printer groks.


Though I think that this is a bug in ghostscript, since it
says that the "-q" option should prevent ghostscript from writing
messages to stdout.  I'll file a PR on the package, anyway.

A workaround may be:

grep -v '^\(%%\[ .*Page.* \]%%\).*=$'

...which is selective enough to probably elminate the unwanted lines,
without killing off real lines.


It'd be better not to generate that in the first place, though.


-- 
  "I probably don't know what I'm talking about."  http://www.olib.org/~rkr/