]> git.ipfire.org Git - thirdparty/cups.git/commit
PPD for driverless IPP: Poll "media-col-database" separately if needed
authorTill Kamppeter <till.kamppeter@gmail.com>
Sun, 22 Jan 2023 00:28:02 +0000 (21:28 -0300)
committerTill Kamppeter <till.kamppeter@gmail.com>
Sun, 22 Jan 2023 00:28:02 +0000 (21:28 -0300)
commitcc63bdd8edff950191d8b1d20cb3a92f4982ea36
tree5da1ea348417b80cdd84fc8ddf378877ec0714f0
parente70cfeec7f1063c5b1b6d62776d3ba2c970cd72e
PPD for driverless IPP: Poll "media-col-database" separately if needed

In the create_local_bg_thread() function for auto-generating a PPD
file for a CUPS queue for a driverless printer, either via the
"everywhere" model selection or an auto-created temporary queue we
need to query the full capabilities information from the printer.

To get the full set of printer properties from a driverless IPP
printer one does a "get-printer-attributes" IPP request with the
attribute "requested-attributes" set to "all,media-col-database" (note
that "all" does not include "media-col-database" because this
attribute is often very long, it contains all valid combinations of
media size, media type, media source, and margins). For some printers
this fails and we fall back to just "all" and lose valuable
information.

But some of those printers which do not support "requested-attributes"
set to "all,media-col-database" support "requested-attributes" set to
"media-col-database" alone and this we now make use of, by polling
"media-col-database" separately and adding it to the IPP response of
"all" if needed.

We discovered such a printer here:

    https://github.com/OpenPrinting/cups-filters/issues/492
scheduler/ipp.c