[cups] PPD API: Status, future and alternatives to handle printer-specific options
Till Kamppeter
till.kamppeter at gmail.com
Tue Jan 31 14:49:38 PST 2017
On 01/31/2017 12:19 PM, Michael Sweet wrote:
>> 2) What is the recommended way to handle printer-specific options in a print dialog? Which API should be used? (The implementation should support both "traditional" printers set up via PPD files and PPD-less printers like IPP Everywhere printers.)
>
> Use the new API. CUPS maps old PPD options to IPP/IPP Everywhere options.
>
I have done some tests concerning getting capabilities and options via
IPP, by taking several of my CUPS queues.
First, I run
ippfind
and see all my CUPS queues represented by ipp://... URIs plus some IPP
network printers.
Then I select one of my CUPS queues and run
lpadmin -p ippcupstest -E -v ipp://... -m everywhere
with the respective ipp://... URI from the output of ippfind.
This makes CUPS polling the IPP get-printer-attributes record and
generate a PPD file from this information. With one queue this failed,
with others I got a PPD file but it has less options and choices than
the original PPD file of the queue, meaning that building a print dialog
based on the IPP record instead of the original PPD seems to be inferior.
To be sure that it is not the fault of CUPS' PPD generator I polled the
IPP record directly via
ipptool -tv ipp://... get-printer-attributes.test > ipp-rec.txt
Now I got the attributes and found out that for the missing items in the
generated PPD partially the IPP get-printer-attributes output and
partially CUPS' PPD generator is the culprit. So I reported the
following CUPS issues:
https://github.com/apple/cups/issues/4950
CUPS queues emulate IPP Everywhere printers: Required IPP attributes not
provided
https://github.com/apple/cups/issues/4951
CUPS queues emulate IPP Everywhere printers: Number of color modes in
capabilities reported by IPP very restricted
https://github.com/apple/cups/issues/4952
CUPS queues emulate IPP Everywhere printers: Not all details of the PPD
file made available as IPP attributes
https://github.com/apple/cups/issues/4953
CUPS PPD generator for driverless printing does not find all options and
choices
With this fixed one could probably very well use IPP Everywhere to
populate print dialogs with the printer-specific information.
But to completely get rid of PPDs one would need to have CUPS support
print queues with filters but without PPDs, where the data format list
which the printer reports by IPP determines the destination format for
the filter chain.
I tried already an approach like this in cups-filters, but it used a
System V Interface script and this concept was removed from CUPS for
security reasons.
Till
More information about the cups
mailing list