Can't print pdf on Legal

Ray Stacey ray.stacey at cgi.com
Wed Aug 3 15:03:32 PDT 2011


> Ray Stacey wrote:
>
> > We are running cups 1.4.7 on Solaris 10. I'm trying to print a pdf file
> > from our application using the command lp -o media=Legal -d treekill2
> > file.pdf. The file always prints on letter (the default) no matter what.
> > I've specified other options such as -o page-ranges and these are
> > honoured.
> >
> > Here's a snippet from the error_log:
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] job-sheets=none,none
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] argv[0]="treekill2"
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] argv[1]="84"
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] argv[2]="rstacey"
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] argv[3]="PFM-B200.r01.2272802.pdf"
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] argv[4]="1"
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] argv[5]="finishings=3 number-up=1
> > page-ranges=1-3 PageSize=Legal
> > job-uuid=urn:uuid:1943fca7-5a72-39fa-71c1-5d5558267334
> > job-originating-host-name=localhost time-at-creation=1312374198
> > time-at-processing=1312374198 AP_D_InputSlot=" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] argv[6]="/var/spool/cups/d00084-001" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[0]="CUPS_CACHEDIR=/var/cache/cups" D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] envp[1]="CUPS_DATADIR=/usr/share/cups" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[2]="CUPS_DOCROOT=/usr/share/doc/cups" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[4]="CUPS_REQUESTROOT=/var/spool/cups" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[5]="CUPS_SERVERBIN=/usr/lib/cups" D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] envp[6]="CUPS_SERVERROOT=/etc/cups" D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] envp[7]="CUPS_STATEDIR=/var/run/cups" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[8]="HOME=/var/spool/cups/tmp" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[9]="LD_LIBRARY_PATH=/usr/local/ssl/lib" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[10]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] envp[11]="SERVER_ADMIN=root at keane" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] envp[12]="SOFTWARE=CUPS/1.4.7" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[13]="TMPDIR=/var/spool/cups/tmp" D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] envp[14]="TZ=Canada/Eastern" D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[15]="USER=root" D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[16]="CUPS_SERVER=/var/run/cups/cups.sock" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[17]="CUPS_ENCRYPTION=IfRequested" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] envp[18]="IPP_PORT=631" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] envp[19]="CHARSET=utf-8" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] envp[20]="LANG=en_US.UTF-8" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[21]="PPD=/etc/cups/ppd/treekill2.ppd" D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] envp[22]="RIP_MAX_CACHE=8m" D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] envp[23]="CONTENT_TYPE=application/pdf" D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] envp[24]="DEVICE_URI=socket://172.21.41.200" D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] envp[25]="PRINTER_INFO=HP LaserJet
> > 8100 Series" D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > envp[26]="PRINTER_LOCATION=125 CVD 6th floor" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[27]="PRINTER=treekill2" D [03/Aug/2011:08:23:18
> > +0500] [Job 84] envp[28]="CUPS_FILETYPE=document" D [03/Aug/2011:08:23:18
> > +0500] [Job 84]
> > envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript" I
> > [03/Aug/2011:08:23:18 +0500] [Job 84] Started filter
> > /usr/lib/cups/filter/pdftops (PID 28269) I [03/Aug/2011:08:23:18 +0500]
> > [Job 84] Started backend /usr/lib/cups/backend/socket (PID 28270) D
> > [03/Aug/2011:08:23:18 +0500] Discarding unused job-state-changed event...
> > D [03/Aug/2011:08:23:18 +0500] Returning IPP successful-ok for
> > Send-Document (ipp://localhost:631/printers/treekill2) from localhost D
> > [03/Aug/2011:08:23:18 +0500] cupsdSetBusyState: Printing jobs and dirty
> > files D [03/Aug/2011:08:23:18 +0500] cupsdReadClient: 13 WAITING Closing
> > on EOF D [03/Aug/2011:08:23:18 +0500] cupsdCloseClient: 13 D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] STATE: +connecting-to-device D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] Looking up "172.21.41.200"... D
> > [03/Aug/2011:08:23:18 +0500] Discarding unused printer-state-changed
> > event... D [03/Aug/2011:08:23:18 +0500] [Job 84] Connecting to
> > 172.21.41.200:9100 I [03/Aug/2011:08:23:18 +0500] [Job 84] Connecting to
> > printer... D [03/Aug/2011:08:23:18 +0500] [Job 84] Set
> > job-printer-state-message to "Connecting to printer...", current
> > level=INFO D [03/Aug/2011:08:23:18 +0500] Discarding unused job-progress
> > event... D [03/Aug/2011:08:23:18 +0500] Discarding unused
> > printer-state-changed event... D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > STATE: -connecting-to-device I [03/Aug/2011:08:23:18 +0500] [Job 84]
> > Connected to printer... D [03/Aug/2011:08:23:18 +0500] [Job 84] Set
> > job-printer-state-message to "Connected to printer...", current level=INFO
> > D [03/Aug/2011:08:23:18 +0500] Discarding unused job-progress event... D
> > [03/Aug/2011:08:23:18 +0500] Discarding unused printer-state-changed
> > event... D [03/Aug/2011:08:23:18 +0500] [Job 84] Connected to
> > 172.21.41.200:9100 (IPv4)... D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > Started filter pdftops (PID 28271) D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > Started filter pstops (PID 28272) D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > ATTR: marker-colors=none D [03/Aug/2011:08:23:18 +0500]
> > cupsdMarkDirty(P-----) D [03/Aug/2011:08:23:18 +0500] [Job 84] ATTR:
> > marker-names="Toner Cartridge HP C4182X" D [03/Aug/2011:08:23:18 +0500]
> > cupsdMarkDirty(P-----) D [03/Aug/2011:08:23:18 +0500] [Job 84] ATTR:
> > marker-types=toner D [03/Aug/2011:08:23:18 +0500] cupsdMarkDirty(P-----) D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] ATTR: marker-levels=19 D
> > [03/Aug/2011:08:23:18 +0500] cupsdMarkDirty(P-----) D
> > [03/Aug/2011:08:23:18 +0500] Discarding unused printer-state-changed
> > event... D [03/Aug/2011:08:23:18 +0500] [Job 84] new_supply_state=0,
> > change_state=ffff D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -developer-low-report D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -developer-empty-warning D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -marker-supply-low-report D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -marker-supply-empty-warning D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > STATE: -marker-waste-almost-full-report D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] STATE: -marker-waste-full-warning D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] STATE: -opc-near-eol-report D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] STATE: -opc-life-over-warning D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > STATE: -toner-low-report D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -toner-empty-warning D [03/Aug/2011:08:23:18 +0500] [Job 84] Page =
> > 612x1008; 12,12 to 600,996 D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > slow_collate=0, slow_duplex=0, slow_order=0 D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] Before copy_comments - %!PS-Adobe-3.0 D [03/Aug/2011:08:23:18
> > +0500] [Job 84] %!PS-Adobe-3.0 D [03/Aug/2011:08:23:18 +0500] [Job 84] %
> > Produced by xpdf/pdftops 3.02 D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > %%Creator: JasperReports (PFM-B200) D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] %%LanguageLevel: 2 D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > %%DocumentSuppliedResources: (atend) D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] %%DocumentMedia: plain 612 792 0 () () D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] %%BoundingBox: 0 0 612 792 D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] %%Pages: 49 D [03/Aug/2011:08:23:18 +0500] [Job 84] %%EndComments D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] Before copy_prolog - %%BeginDefaults
> > D [03/Aug/2011:08:23:18 +0500] [Job 84] Before copy_setup - %%BeginSetup D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] Before page loop - %%Page: 1 1 D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] Copying page 1... D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] PAGE: 1 1 D [03/Aug/2011:08:23:18
> > +0500] Discarding unused job-progress event... D [03/Aug/2011:08:23:18
> > +0500] [Job 84] pagew = 587.8, pagel = 983.8 D [03/Aug/2011:08:23:18
> > +0500] [Job 84] bboxx = 0, bboxy = 0, bboxw = 612, bboxl = 1008 D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] PageLeft = 12.0, PageRight = 599.8 D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] PageTop = 995.8, PageBottom = 12.0 D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] PageWidth = 612.0, PageLength =
> > 1008.0 D [03/Aug/2011:08:23:18 +0500] [Job 84] new_state=0,
> > change_state=ffff D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -media-low-report D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -media-empty-warning D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -door-open-report D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -media-jam-warning D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -input-tray-missing-warning D [03/Aug/2011:08:23:18 +0500] [Job 84] STATE:
> > -output-tray-missing-warning D [03/Aug/2011:08:23:18 +0500] [Job 84]
> > STATE: -marker-supply-missing-warning D [03/Aug/2011:08:23:18 +0500] [Job
> > 84] STATE: -output-area-almost-full-report D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] STATE: -output-area-full-warning D [03/Aug/2011:08:23:18 +0500]
> > [Job 84] backendRunLoop(print_fd=0, device_fd=5, snmp_fd=6, addr=806e34c,
> > use_bc=1, side_cb=8051f5e) D [03/Aug/2011:08:23:18 +0500] [Job 84] Read
> > 8192 bytes of print data... D [03/Aug/2011:08:23:18 +0500] [Job 84] ATTR:
> > marker-levels=19 D [03/Aug/2011:08:23:18 +0500] cupsdMarkDirty(P-----) D
> > [03/Aug/2011:08:23:18 +0500] [Job 84] new_supply_state=0, change_state=0 D
> > [03/Aug/2011:08:23:18 +0500] Discarding unused printer-state-changed
> > event... D [03/Aug/2011:08:23:18 +0500] [Job 84] new_state=0,
> > change_state=0 D [03/Aug/2011:08:23:18 +0500] [Job 84] Wrote 8192 bytes of
> > print data... D [03/Aug/2011:08:23:18 +0500] [Job 84] Read 8192 bytes of
> > print data...
> >
> >
> >
> > Any ideas??
>
> Yes, I do.
> The pdftops filter of 1.4.7 which is, in fact, a wrapper for either a
> utility named pdftops or Ghostscript, determines the output page size by
> querying only the *default* page size as specified in the printer's PPD, and
> ignores the page size name as given by the job options. And as I see from
> your log messages, the default page size is letter.
> I deduced this from looking into the 1.4.7 sources. If you think it should
> be verified by testing, please send me the input PDF and the PPD for
> testing, as I have a cups 1.4.6 on a SUSE 11.4 system available.
>
> Alternatively, you may look at the "alternate pdftops filter" on the links
> page(s) at www.cups.org. The filter published there is a Perl script that
> either calls the pdftops utility (from the xpdf suite 3.02, what is what you
> have) or adobe reader, whichever is installed and set up as preferred
> utility. In either case, this filter uses the media box of the pdf file (or
> the first page, whichever is specified).
>
> Helge
>
I implemented the alternative pdftops filter (replaced the existing) and was able to print on legal. Thanks. A couple of questions:

1. Is there any downside to using this alternative filter?
2. Why would the cups pdftops filter just ignore the page size and go with the ppd default? It seems counter-intuitive.






More information about the cups mailing list