printcap configuration problem
wblock at wonkity.com
Sat Aug 2 16:34:52 UTC 2014
On Sat, 2 Aug 2014, Beeblebrox wrote:
> Below is what I have in printcap and the filter file. psif is straight out
> of the Handbook page. When printing an existing ps file with "$ /usr/bin/lpr
> -Php2100", the resulting hardcopy has 3-4 lines truncated from the top - I
> can't figure it out.
Sorry, I don't understand the question.
> Secondly, I don't see the point of piping an already ps-formated file
> through ghostscript, unless it's to adjust print resolution. Is gs smart
> enough to recognize a ps file and simply (and quickly) modify the ink amount
> or must it do a complete re-process of the page?
Ghostscript is not involved here. The first two characters of the
incoming file are read. If they are %!, it is assumed to be a
PostScript file and sent straight through. Otherwise, it is assumed to
be a plain text file, and formatted into a PostScript file with
Both cases are for use with a printer that understands PostScript
natively. A plain LaserJet 2100 does not, although there was a 2100m
that did, and a PS SIMM could be added to the other models.
> # psif: Print PostScript or plain text on a PostScript printer
> IFS="" read -r first_line
> first_two_chars=`expr "$first_line" : '\(..\)'`
> case "$first_two_chars" in
> # %! : PostScript job, print it.
> echo "$first_line" && cat && exit 0
> exit 2
> # otherwise, format with enscript
> ( echo "$first_line"; cat ) | /usr/local/bin/enscript -o - && exit 0
> exit 2
More information about the freebsd-questions