[cups.general] Problems printing PDF files through cups.

Gerald Britton gerald.britton at gmail.com
Mon Oct 1 07:01:08 PDT 2007


Well, folks, I'm back at it today.  Still trying to get good printouts
of pdfs.  To recap:

I have a large (12x18 inch) PDF, which is actually a scan of an old
(1851) census.  I want to print it on legal-sized paper (8 1/2x14),
scaled to fit the page lengthwise (landscape).  Acting on the
excellent guidance of Helge and Kurt, I did the following:

1. removed the "/DeferredMediaSelection true" option from the page
size and page region statements like this:

sudo sed 's/\/DeferredMediaSelection true \/PageSize/\/\/PageSize/' \
/etc/cups/ppd/ps0198.ppd |> /etc/cups/ppd/ps0198new.ppd

2. Set these environment variables:

export PPD=/etc/cups/ppd/ps0198new.ppd
export CUPS_SERVERROOT='/etc/cups/'

3. Ran pdftops (the binary, not the perl script):

/usr/bin/pdftops -v
pdftops version 3.00
Copyright 1996-2004 Glyph & Cog, LLC

/usr/bin/pdftops -paper legal
/home/shared/gramps/media/CanadaCensus1851/CAN1851Census-Hamilton-ON-Pg303a.pdf
/tmp/pdftops.out

4. Printed the result;

lp -d ps0198 -o raw /tmp/pdftops.out

The results are just what I wanted!!!!

5. ran the file through the pstops filter:

/usr/lib/cups/filter/pstops "1" "dummy" "dummy" "1" "fitplot=true
PageSize=Legal" /tmp/pdftops.out > /tmp/pstops.out

6. printed the result

lp -d ps0198 -o raw /tmp/psftops.out

Unfortunately, this time the results are not correct.  The image is
printed on legal paper stock, lengthwise, but scaled to fit letter
stock :-(

FWIW I ran the above tests using the original ppd file (with the
"/DeferredMediaSelection true" in the page size and page region
statements).  The results are exactly the same through step 4.  At
step 6, I had to manually select the paper at the printer, but it was
scaled properly!

So it looks like DeferredMediaSelection does what it says in terms of
making the printer start by itself or not, but has a side effect of
somehow affecting the scaling of the printout.


Weird!

Kurt mentioned that the pdftops program I have is NOT the one in CUPS
CVS.  Could anyone send me that one, compiled for 32-bit Linux?  I'd
love to try it out!





More information about the cups mailing list