pdftops replace with Ghostscript
Franz Pfoertsch
franz.pfoertsch at brose.com
Tue Jan 29 00:26:31 PST 2008
max server wrote:
> Can I replace the pdftops by a Ghostscript call?
> If so, how can I do this?
Yes do something like this, as filterscript at /usr/lib/cups/filter
---8<---- file: pswrite
#! /bin/bash
# enable "set -x" for debug info in /var/log/cups/error_log
#set -x
# set inputfile to where the input comes from
inputfile="-"
[ -n "$6" ] && inputfile="$6"
# output PostScript level 1 (for PostScript level 2 use -dLanguageLevel=2)
gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=pswrite -dLanguageLevel=1 -sOutputFile=-
$inputfile
---8<--------
and change
the following line in /etc/cups/mime.convs from
application/pdf application/postscript 33 pdftops
to
application/pdf application/postscript 33 pswrite
but!
is it really necessary?
What is the reason to do it?
regards
Franz
More information about the cups
mailing list