cups icon indicating copy to clipboard operation
cups copied to clipboard

Map PPD defaults to IPP "-default" attributes

Open zdohnal opened this issue 4 months ago • 5 comments

Describe the bug If you install the printer with IPP Everywhere and change the default color model, the change in default color model does not propagate to job if there is a preset which sets color model.

Tbh I'm not sure which settings have the priority here - preset or default color model?

If preset, is there a way how to turn it off permanently?

Or should we update the preset as well when we set a different default color model?

And if default color model is preferred, we have to figure out how to turn on preset on demand....

To Reproduce

1. $ lpadmin -p test -v ipp://<color printer ip>/ipp/print -m everywhere -E
2. go to web ui -> Printers -> printer test -> Administration scroll menu -> set default options -> change Color to Color
3. lp -d test <colored file>

** Actual behavior ** Grayscale printout even when DefaultColorModel is RGB.

Expected behavior Color printout when expected

System Information:

  • OS Fedora 42
  • CUPS 2.4.12

zdohnal avatar Sep 09 '25 11:09 zdohnal

From my POV it makes sense to update the preset when the default color model changes, but I'll wait for @michaelrsweet POV.

EDIT: well, since the presets are called Gray_*, it would have to change the name, so maybe do not use preset if default color model is different from Gray?

FTR PPD

zdohnal avatar Sep 09 '25 11:09 zdohnal

@zdohnal I'd need to see the PPD file and a debug error_log file to say for sure, but generally IPP defaults (print-color-mode-default, etc.) override PPD defaults, so I'm guessing that the print-color-mode-default value is overriding the PPD default in this case. And that probably means we should update the CGI to set print-color-mode-default when setting PPD defaults...

michaelrsweet avatar Sep 09 '25 15:09 michaelrsweet

@michaelrsweet I'm sorry - here are the logs. It contains setting the default value and then printing the test page.

It looks to me the preset generates "ColorModel Gray", and in that case we take the value and adjust print-color-mode accordingly.

zdohnal avatar Sep 10 '25 10:09 zdohnal

OK, let's track this issue as a bug to set the IPP defaults for the various PPD options:

  • "media-col-default" for DefaultPageSize/MediaType/InputSlot
  • "media-default" for DefaultPageSize
  • "output-bin-default" for DefaultOutputBin
  • "print-color-mode-default" for DefaultColorModel
  • "print-quality-default" for DefaultcupsPrintQuality
  • "sides-default" for DefaultDuplex

michaelrsweet avatar Sep 10 '25 17:09 michaelrsweet

Is there any further info I can provide on this one to help move it along?

wt avatar Oct 30 '25 05:10 wt