OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
1.06k stars 190 forks source link

Temporary CUPS queue support only a single 'printer-resolution' value #445

Closed TinyTrebuchet closed 2 years ago

TinyTrebuchet commented 2 years ago

Temporary CUPS queue created for printers only support a single 'printer-resolution' value, even if the printer supports multiple printer resolutions. This can be checked by using the ipptool command to get the printer attributes from the temporary CUPS queue (after materializing it). The actual list of supported 'printer-resolution' values can be checked by sending the ipptool command directly to the printer instead. The supported printer-resolution value is usually 300dpi and sometimes 600dpi which might possibly the first supported value by such printers.

tillkamppeter commented 2 years ago

@michaelrsweet, why did you mark this "wontfix" without any comment? Is showing only one resolution for a printer with different selectable resolutions expected, standards-conforming behavior?

michaelrsweet commented 2 years ago

@tillkamppeter I don’t know why my comment got lost.

yes, this is expected behaviour. The set of input resolutions is distinct from the output resolutions. pwg-raster-document-resolution-supported and urf-supported provide the input document resolutions that we MUST use when generating raster data.

tillkamppeter commented 2 years ago

My HP OfficeJet Pro 8730 has following attributes (get-printer-attributes IPP request directly to the printer, URI from driverless --std-ipp-uris command):

urf-supported (1setOf keyword) = CP1,MT1-2-8-9-10-11,PQ3-4-5,RS300-600,SRGB24,OB10,W8,DEVW8,DEVRGB24,ADOBERGB24,DM3,FN3,IS1-2,V1.4
pwg-raster-document-resolution-supported (1setOf resolution) = 300dpi,600dpi
printer-resolution-supported (1setOf resolution) = 300dpi,600dpi,1200dpi

This tells that it accepts input resolutions of both 300 dpi and 600 dpi for both PWG Raster and URF input formats. But the printer can internally enhance to 1200 dpi (or render PDF input in 1200 dpi).

When I do an get-printer-attributes IPP request on the virtual CUPS queue, after I have selected the print queue in the GTK print dialog of any application to make CUPS creating the temporary queue, I get

urf-supported (1setOf keyword) = V1.4,CP1,W8,PQ3-4-5,SRGB24,RS300,DM1,FN3
pwg-raster-document-resolution-supported (resolution) = 300dpi
printer-resolution-supported (resolution) = 300dpi

This means, CUPS only accepts raster data with 300 dpi for the printer and does not tell the user about any possibility that CUPS itself or the printer could internally enhance to a higher resolution. It also does not give the user any control about the resolution. The printer's capabilities are not carried on to the CUPS clients and the filters (from cups-filters) have no problem to carry through or convert raster data with a higher resolution.

Also other capabilities in the urf-supported like that the printer has 2 trays or the media types are not carried through by the CUPS queue. DM3 -> DM1 is correct though, as the filters manage the backside orientation.

michaelrsweet commented 2 years ago

@tillkamppeter the tray and media type info in the urf-supported attribute for,the CUPS queue is not important - it doesn’t affect the raster data and isn’t needed for AirPrint.

WRT the printer resolution, the current best practice for printers is to choose an output resolution based upon print-quality and media-type.

tillkamppeter commented 2 years ago

But if you let CUPS only report a single resolution to make print dialogs not show the resolution as settable option, so that users do not choose the resolution directly, would it then not be better to show the printer's default (or medium) resolution or perhaps even the high resolution? As with reporting the lowest resolution, client applications are made sending raster data (or images embedded in PDF files) in this lowest resolution and the printer prints higher resolutions only by interpolation (either done by the CUPS filters or by the printer itself), so one does not get the full output quality of the printer.

In the retro-fitting Printer Applications I fill the driver data record of PAPPL with 3 resolutions, one for draft (360 dpi max), one for normal (720 dpi max, usually the default), and high quality (1440 dpi max) and do not use the 4th slot which PAPPL provides. Then PAPPL chooses one of the 3 as input resolution according to print-quality setting. The output resolution is selected by the embedded classic driver (can get very high for the Gutenprint Printer Application).

And does CUPS auto-select resolutions by the setting of print-quality?

michaelrsweet commented 2 years ago

@tillkamppeter First, the printer only accepts raster data at the specified resolutions. You can't get it to accept data at higher resolutions no matter how much you want.

Second, when the printer does support multiple resolutions, CUPS will select an appropriate resolution based on the print quality unless the user explicitly chooses one. Currently we do not send the printer-resolution attribute so we will always have the printer choose the output resolution based upon print quality, input resolution, and media.

Finally, printer resolution is not necessarily the determiner of output quality - many photo printers offer more drop sizes at the second highest output resolution.