OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
957 stars 174 forks source link

Default value for print quality is ignored #939

Closed mkosch closed 2 months ago

mkosch commented 2 months ago

I'm using OpenPrinting CUPS 2.4.7. My PPD file (see Canon_GX7050-photo.ppd.txt) specifies print qualities using the keyword "cupsPrintQuality" and also a default print quality using the keyword "DefaultcupsPrintQuality". I would like to use the value "High" as default print quality. However, when opening a print dialog from KDE applications the default print quality is always set to "Normal", no matter what I specify using "DefaultcupsPrintQuality".

The current value of "DefaultcupsPrintQuality" is used and correctly shown in the CUPS web interface (http://localhost:631/) when specifying printer options. However, using the commands lpoptions -l and ipptool -tv ipp://localhost/printers/Canon_GX7050-photo get-printer-attributes.test always show the default print quality Normal or normal no matter what I setup using "DefaultcupsPrintQuality".

I found out that I can successfully change the default print quality with the file ~/.cups/lpoptions using the option "Default Canon_GX7050-photo cupsPrintQuality=High". This works with the "lpoptions" command and KDE applications but not with the "ipptool" command.

I suspect that CUPS reports the wrong value for default print quality when using the usual API call.

michaelrsweet commented 2 months ago

OK, so to override the PPD default on the server you need to use lpadmin, e.g.:

lpadmin -p PRINTER -o DefaultcupsPrintQuality=High

You can also use:

lpadmin -p PRINTER -o print-quality-default=5

which is the actual IPP attribute name that gets mapped to the PPD option.

Using lpoptions will only affect the "lp" and "lpr" commands and any GUI dialogs that support the lpoptions stuff (not universal, unfortunately). The ipptool command just send raw IPP requests so you'd need to use lpadmin to affect them at all...