[cups] Handling of "Installable Options" in user applications

Johannes Meixner jsmeix at suse.de
Mon Sep 7 06:48:27 PDT 2015


Hello,

On Sep 7 13:49 Brian Potkin wrote (excerpt):
> A queue set up with Tea4CUPS can be set up as a raw queue.
> I suppose a user could have knowledge of options from
> elsewhere and *specify* them for a job.

But then there must be also a non-raw queue
that does the actual print job processing.

To avoid that users use that non-raw queue directly
it would have to be set up so that normal users are
not allowed to submit print jobs to that queue.


> ... how is the system adjusted to deal with non-PPD
> specific options (like the ones provided by cups-filters)
> to make sure they are applied?

Basically - as far as I know - you cannot make settings
in the system for non-PPD options.

For example assume a user submits a job with:

$ echo hello | lp -d queue_name -o foo=bar -o PageSize=A4

Then all filtering programs will be called by the cupsd
each program with all options as argv[5], see "man filter".

In my above example all filtering programs will get
both the options PageSize=A4 and foo=bar.

What options each filtering program actually understands
depends on each filtering program.

For example several filtering programs may need to
operate different depending on the page size so that
they all understand and use the PageSize=A4 option.

But no filtering programs may understand the foo=bar
nonsense option so that this option has no effect.

This way how options are used by all filtering programs
can cause unexpected "effects".

Assume a user submits a job with:

$ echo hello | lp -d queue_name -o rotate=90degrees

When there is only one filtering program that understands
and uses the rotate=90degrees option, then the output
is what the user expects.

But when two filtering programs understand and use the
rotate=90degrees option, then the output is probably
not what the user expects (i.e. two times rotated
by 90 degrees).

Actually there have been "interesting effects" when
more than one filtering program cared about an option
of the form copies=10 resulting 10*10=100 copies when two
filtering programs created each 10 copies for each page.
For example when first "hello" is converted to 10 pages
of PDF and then (e.g. because a PostScript printer is
used) each PDF page is converted to 10 pages PostScript.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)




More information about the cups mailing list