[cups.general] Problems printing PDF files through cups.
Kurt Pfeifle
k1pfeifle at gmx.net
Thu Sep 27 13:12:08 PDT 2007
Gerald Britton wrote:
> OK -- I'll need a bit of help. I tried:
>
> $CUPS_SERVERROOT='/etc/cups/' /usr/lib/cups/filter/pdftops.new my.pdf
Unless the '$' above is coming from your prompt, this is the wrong way
to set the environment variable on the commandline....
And the command itself - you should call it like adviced by this output
(occurs when running the filter without any arguments):
kurt at lx50:~> /usr/lib/cups/filter/pdftops
Usage: pdftops job user title copies options [filename]
This translates to (for example):
/usr/lib/cups/filter/pdftops "1" "dummy" "dummy" "1" "dummy" my.pdf
/usr/lib/cups/filter/pdftops "1" "" "" "1" "" my.pdf
And with some environment variables set (no '$' please!):
CUPS_SERVERROOT=/etc/cups/ \
PPD=/etc/cups/ppd/yourprintername.ppd \
/usr/lib/cups/filter/pdftops "911" "gerald" "testing pdf printing" "1" "dummy" /path/to.pdf \
| /usr/lib/cups/filter/pstops "911" "gerald" "testing pdf printing" "1" "dummy" \
| tee /tmp/filtered_output-to_be_sent_to-helge.ps
However, since you want to see results for "fitplot" and some specific
media size (I don't remember which), you'll want to set these options
on the commandline in ${5} (and you likely don't need CUPS_SERVERROOT
set in your use case -- but PPD for sure!):
PPD=/etc/cups/ppd/yourprintername.ppd \
/usr/lib/cups/filter/pdftops "1" "gerald" "pdftest" "1" "fitplot=true PageSize=Letter" my.pdf \
| /usr/lib/cups/filter/pstops "1" "gerald" "pdftest" "1" "fitplot=true PageSize=Letter" \
| tee /tmp/filtered_output-to_be_sent_to-helge.ps
For a first quick look, you can also pipe it into a PostScript viewer:
PPD=/etc/cups/ppd/yourprintername.ppd \
/usr/lib/cups/filter/pdftops "1" "dummy" "dummy" "1" "fitplot=true PageSize=Letter" my.pdf \
| /usr/lib/cups/filter/pstops "1" "dummy" "dummy" "1" "fitplot=true PageSize=Letter" \
| gv -
BTW, here is the list of *all* env params proviced cupsd for all running
filters and backends to see and pick up if they need to:
CUPS_CACHEDIR
CUPS_DATADIR
CUPS_DOCROOT
CUPS_FONTPATH
CUPS_REQUESTROOT
CUPS_SERVERBIN
CUPS_SERVERROOT
CUPS_STATEDIR
LD_LIBRARY_PATH
LD_PRELOAD
PATH
SERVER_ADMIN
SOFTWARE
TMPDIR
USER
CUPS_SERVER
CUPS_ENCRYPTION
IPP_PORT
CHARSET
LANG
PPD
RIP_MAX_CACHE
CONTENT_TYPE
DEVICE_URI
PRINTER
FINAL_CONTENT_TYPE
--
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH ..................... Hedelfinger Strasse 58
A RICOH Company ........................... D-70327 Stuttgart/Germany
More information about the cups
mailing list