[cups] Query regarding setting up common Interface for print jobs

Brian Potkin brian at copernicus.org.uk
Tue Aug 22 07:07:16 PDT 2017


On Tue 22 Aug 2017 at 14:02:01 +0200, Johannes Meixner wrote:

> Hello,

Hello Johannes.
 
> On Aug 10 18:59 Brian Potkin wrote (excerpt):
> >>>The OP wants to discriminate between submitted files based on which
> >>>*application* they came from. In the most general case this is most
> >>>likely not doable. Narrowing it down to particular applications might
> >>>produce a solution.
> ...
> >Evince and Firefox both send a PDF to the printing system. Both PDFs are
> >generated by Cairo. How does one distinguish between the applications
> >which are used to send "My cooking recipes"?
> 
> If one can specify different print job options in the
> print settings for each application for example
> so that Firefox submits a print job like
>   lp -o myapplication=firefox ...
> and Evince submits a print job like
>   lp -o myapplication=evince ...
> then those additional application-specific print job
> options are available to all filters in argv[5].

I am assuming a single queue "printq" is visible in the print dialogs
of the applications. On a per-user basis one could set Firefox to print
with PageSize=A and Evince to print with PageSize=B. If one wants these
options to be enforcable by an administrator I see no way to do it
which cannot be altered by a user via the application's print options
or lpoptions.

> Because the usual filters ignore unknown print job options
> only a special selfmade filter could do "the right thing".

printq is a virtual queue set up with the Tea4CUPS backend. A pre-hook
examines PageSize and directs the job to a queue for printer C or D
depending on its value, at the same time changing PageSize to something
sensible.

-- 
Brian.


More information about the cups mailing list