PPD for driverless IPP: Poll "media-col-database" separately if needed #599
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: