cups ignores options

Helge Blischke h.blischke at acm.org
Thu Nov 5 07:57:02 PST 2009


Christoph Litauer wrote:

> Helge Blischke schrieb:
>> Christoph Litauer wrote:
>> 
>>> Hi,
>>>
>>> cups-Server: 1.1.23, SuSE SLES
>>> cups-Client: Mac OS 10.6.1
>>>
>>> On the client I added a cups shared printer via
>>> ipp://printserver:631/printers/presse. The printserver defines duplex
>>> printing by default for presse . Sometimes I want to disable duplex
>>> printing or print colors as grey etc. but my options are ignored on the
>>> cups server.
>>>
>>> I tracked it down a bit:
>>> On the cups server I use Helge's pdftops-filter. This filter is called
>>> with lots of options. The last option is "sides=one-sided". So my Mac
>>> tells the cups server to print this document simplex ... but pdftops
>>> seems to ignore the option and the resulting postscript file contains
>>>
>>> /pdfSetup {
>>>   3 1 roll 2 array astore
>>>   /setpagedevice where {
>>>     pop 3 dict begin
>>>       /PageSize exch def
>>>       /ImagingBBox null def
>>>       /Policies 1 dict dup begin /PageSize 3 def end def
>>>       { /Duplex true def } if
>>>     currentdict end setpagedevice
>>>   } {
>>>     pop pop
>>>   } ifelse
>>> } def
>>>
>>> Thus, the document is printed duplex.
>>>
>>> I wonder where this "sides=one-sided" comes from. I can not find these
>>> strings in the printers ppd file ... any hints?
>>>
>> 
>> That statement in braces
>> { /Duplex true def} if
>> only gets executed if the pdftops utility (called from my filter script)
>> is configured to force duplex by the respective statement in the config
>> file. I guess you have set
>> psDuplex yes
>> in the config file. You should set this to no (or delete this statement,
>> as no is the default) and configure the default duplexing using the
>> respective PPD option so that duplexing is selected by the pstops filter.
>> Then your "sides=one-sided" will take effect.
> 
> Helge, thanks for your quick answer.
> Sadly, I had no option psDuplex in pdftops.conf, setting it to "no" did
> not change anything. Perhaps you get further when getting more
> information?
> 
> Looking in http://www.uni-koblenz.de/~litauer/cups/ you will find some
> files:
> 1.) pdftops.conf
> 2.) test.pdf is the pdf-input
> 3.) test.out is the output sent through all filters, the code that is
> sent to the printer
> 4.) test.ps is generated by:
> env PRINTER=test CUPS_SERVERROOT=/etc/cups /usr/lib/cups/filter/pdftops
> 123 username test 1 "sides=one-sided" test.pdf |
> env PRINTER=test /usr/lib/cups/filter/pstops 123 username test 1
> "sides=one-sided" > test.ps
> 5.) test.ppd is the printers ppd file.
> 

Christoph,

from your files I infer that you printed the PDF from a Mac OX 10.6 box 
(which uses CUPS 1.4.1, I think) to your Linux box which uses CUPS 1.1.23, 
as you told. And the PPD seems to be from the Linux box (as it is quite 
incommon to have foomatic-rip installed on an Os X box).

The PPD contains the line

*cupsFilter: "application/postscript 0 pagecount"

As (usually) the mime.convs states that tho output from the pdftops filter 
(whatever variant his is) is of type application/postscript, the above cited 
line forces the output though a filter named pagecount, and this is the last 
one. So I suspect this filter sets the duplex option from the PPD, as the 
input PDF as well as the ps files you derived "by hand" correctly do not 
specify duplex printing.

Perhaps you could turn on debug for a sample job and post (an URL to) the 
respective section of the CUPS error_log.

Helge





More information about the cups mailing list