Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Map more PPD options for stapling to IPP #4960

Closed

Description

@michaelweghorn

When a printer is set up with a PPD (rather than using an IPP Everywhere printer), CUPS internally maps (some) PPD options to respective IPP attributes.

Among others, this makes it possible to access the device capabilites without using the deprecated PPD API. Options that are not mapped to IPP attributes are still unavailable, as recently discussed in the thread "PPD API: Status, future and alternatives to handle printer-specific options" on the CUPS mailing list. [1], [2]

The output of ipptool -t -v ipp://localhost/printers/myprinter get-printer-attributes.test > ipptool_output_attributes_Ricoh_MP_C5504.txt (where "myprinter" has been set up with the attached PPD file of a RICOH MP C5504) is attached.

The following line indicates that stapling is supported:

finishings-supported (1setOf enum) = none,staple

The PPD file provides various possibilities for stapling (PPD keyword "StapleLocation"). However, when this is mapped to IPP attributes, the only option that is available is to enable or disable stapling (no more detailed options like where to staple).

As suggested on the CUPS mailing list [1], I am asking to support more (non-standard) keywords to map stapling options from the PPD to respective IPP attributes.

(Note: I used cups 2.2.2 on Debian experimental for testing.)

[1] http://lists.cups.org/pipermail/cups/2017-January/thread.html
[2] http://lists.cups.org/pipermail/cups/2017-February/thread.html
[3] http://lists.cups.org/pipermail/cups/2017-February/028204.html

Activity

  1. michaelweghorn commented on Feb 7, 2017

    @michaelweghorn
    ContributorAuthor

    These are the mentioned attachments (PPD and output of ipptool):

    Ricoh-MPC5504-Postscript-deutsch-V1.2.ppd.txt
    ipptool_output_attributes_Ricoh_MP_C5504.txt

  2. added this to the milestone on Feb 17, 2017
  3. michaelrsweet commented on Mar 8, 2017

    @michaelrsweet
    Contributor

    OK, so right now CUPS depends on the cupsIPPFinishings keyword to provide the vendor-specific mapping of finishing options in the PPD to the corresponding IPP finishing templates.

    Will look at updating _ppdCacheCreateWithPPD and cupsd's load_ppd to support better heuristics when dealing with PPDs not optimized for use with CUPS, and (for cupsd) to use the cupsIPPFinishings attribute (when present) when populating the finishings-supported attribute.

  4. michaelrsweet commented on Mar 9, 2017

    @michaelrsweet
    Contributor

    Changes in TOT...

  5. douira commented on Aug 18, 2019

    @douira

    So what kind of values can I expect from the option finishings when I parse it from the output of lpoptions? I see it usually is 3 when there are no finishings but what value does it have when there are finishings? Will it be a string or an array of magic numbers that stand for some combination of finishings?

  6. michaelrsweet commented on Aug 19, 2019

    @michaelrsweet
    Contributor

    @douira The lpoptions output will show the default value, so 3 is 'none', 4 is 'staple', 5 is 'punch', etc., just as show in the IANA IPP registry. Multiple values can typically be used ("4,5" to staple and punch holes), although that (obviously) depends on the printer and values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions