Which is the correct way to specify collate

Anders Blomdell anders.blomdell at control.lth.se
Tue Jan 23 02:15:19 PST 2007


> Anders Blomdell wrote:
> > With cups 1.2.7 (on fedora6 at least), top level collate has stopped
> > working from kprinter and gtklp on printers that support collate. The
> > reason is that the collate option exists in both the ppd file and in
> > the cups interface, so my question is simply, should collate be
> > specified with:
>  > ...
>
> For printing jobs, use cupsAddOption.  ppdMarkOption() only marks the
> option in the PPD file/data, which doesn't get applied to the job
> unless you actually save your changes to the PPD file in
> /etc/cups/ppd.
>
A follow-up question; we configure our printer(s) by giving the following command on the cups server:

  lpadmin -p Printer -o Collate=True

if I (or rather gtklp) does a:

  cupsGetOption("collate",act_printer->num_options,act_printer->options)

NULL is returned, while if I do a

  ppdFindMarkedChoice(printerPPD,"Collate")

'True' is returned. If I then do a save (i.e. creating a ~/.cups/lpoptions), subsequent calls to:

  cupsGetOption("collate",act_printer->num_options,act_printer->options)

returns 'true' and calls to:

  ppdFindMarkedChoice(printerPPD,"Collate")


returns 'True'.

Am I correct to assume that this means that 'ppdFindMarkedChoice' should be called to determine the preferred choice to use, and 'cupsAddOption' should be used for the actual printing?

/Anders Blomdell




More information about the cups mailing list