[cups.general] Printing PDF files with CUPS and lp command

Helge Blischke h.blischke at srz.de
Thu Oct 4 06:28:00 PDT 2007


Gerald Britton wrote:
> fwiw, the DeferredMediaSelection is in abbout half of the  PPDs (32 out of 62):
> 
> $ zgrep -ci DeferredMediaSelection.True
> /usr/share/ppd/openprinting/HP/mono_laser/* |grep :[0-9][0-9]
> 
> produced:
> 
> /usr/share/ppd/openprinting/HP/mono_laser/hp_LaserJet_2300.ppd.gz:39
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_2410.ppd.gz:45
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_2420.ppd.gz:45
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_2430.ppd.gz:45
> /usr/share/ppd/openprinting/HP/mono_laser/hp_LaserJet_4200_Series.ppd.gz:41
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4240.ppd.gz:43
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4250.ppd.gz:43
> /usr/share/ppd/openprinting/HP/mono_laser/hp_LaserJet_4300_Series.ppd.gz:41
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4345_MFP.ppd.gz:37
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4350.ppd.gz:43
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4ML.ppd.gz:18
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4MP.ppd.gz:18
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4_Plus.ppd.gz:22
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_4V.ppd.gz:37
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_5200L.ppd.gz:59
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_5200.ppd.gz:59
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_5M.ppd.gz:30
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_5MP.ppd.gz:34
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_5Si_Mopier.ppd.gz:52
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_5Si.ppd.gz:52
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_6MP.ppd.gz:33
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_9040_9050_MFP.ppd.gz:52
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_9040.ppd.gz:52
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_9050.ppd.gz:52
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_9055_9065_MFP.ppd.gz:56
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_M3027_MFP.ppd.gz:31
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_M3035_MFP.ppd.gz:31
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_M4345_MFP.ppd.gz:32
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_M5025_MFP.ppd.gz:45
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_M5035_MFP.ppd.gz:45
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_P3004.ppd.gz:35
> /usr/share/ppd/openprinting/HP/mono_laser/HP_LaserJet_P3005.ppd.gz:35
> 
> Which makes me think that if DeferredMediaSelection True is an error,
> it's a big one!
> 
> On 10/4/07, Helge Blischke <h.blischke at srz.de> wrote:
> 
>>Gerald Britton wrote:
>>
>>>This is primarily for Kurt and Helge:
>>>
>>>On a newly installed ubuntu feisty 7.04, I did the following:
>>>
>>>$ /usr/bin/pdftops -v
>>>pdftops version 3.00
>>>Copyright 1996-2004 Glyph & Cog, LLC
>>>$/usr/bin/pdftops my.pdf /tmp/pdftops.out
>>>$lp -o raw /tmp/pdftops.out
>>>
>>>Result: output correctly scaled and printed automatically!
>>>
>>>$/usr/lib/cups/filter/pstops 1 'me' 'me' 1 '' /tmp/pdftops.out >/tmp/pstops.out
>>>$lp -o raw /tmp/pstops.out
>>>
>>>Result: output correctly scaled and printed automatically!
>>>
>>>lp my.pdf
>>>
>>>Result:  Printer prompted me for paper size A4.  Results not scaled to
>>>fit the page
>>>
>>>The log (loglevel info) for the job is:
>>>
>>>I [03/Oct/2007:10:49:34 -0400] Adding start banner page "none" to job 10.
>>>I [03/Oct/2007:10:49:37 -0400] Adding end banner page "none" to job 10.
>>>I [03/Oct/2007:10:49:37 -0400] Job 10 queued on
>>>"hp_LaserJet_9040_MFP_10.18.16.253" by "jerryb1".
>>>I [03/Oct/2007:10:49:40 -0400] Started filter
>>>/usr/lib/cups/filter/pdftops (PID 5452) for job 10.
>>>I [03/Oct/2007:10:49:40 -0400] Started filter
>>>/usr/lib/cups/filter/pstops (PID 5454) for job 10.
>>>I [03/Oct/2007:10:49:40 -0400] Started backend
>>>/usr/lib/cups/backend/socket (PID 5455) for job 10.
>>>E [03/Oct/2007:10:49:43 -0400] [Job 10] pdftops-options: -cfg
>>>/etc/cups/pdftops.conf
>>>
>>>
>>>So, it seems that the pdftops filter in /usr/lib/cups/filters may be
>>>the culprit here.  Is it possible to disable it somehow so only the
>>>binary pdftops runs?
>>>
>>
>>Remember the modifications you did on the printer's PPD following
>>my suggestions. Did you perform the same modifications on the
>>new system?!
>>
>>Helge
>>
>>--
>>Helge Blischke
>>Softwareentwicklung
>>
>>H.Blischke at acm.org
>>_______________________________________________
>>cups mailing list
>>cups at easysw.com
>>http://lists.easysw.com/mailman/listinfo/cups
>>
> 
> 

Well, yes, it usually is used in the "fit to page" options group, of course.
But specifying this attribute - wether true or false - together with
the pasge size selection is contradictory:
when picking the "fit to page" option:
	/DeferredMediaSelection false
when selcting a page size:
	/DeferredMediaSelection true

In such cases the PS interpreter follows the setting it gets
last. And as (at least in the case we talked about) the PPD specifies
the media selection sturr *after* the fit to page stuff, the
deferred media selection takes place, and that is why the printer
asks you for a specific paper.

And, as you posted earlier, if you run the pstops filter
by hand without specifying the PPD (as we aggreed upon before),
the said contradiction cannot take place, and thus it works.

Helge


-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list