Bug 352438 - Hide "Installable Options" of PPD in print-dialog
Summary: Hide "Installable Options" of PPD in print-dialog
Status: RESOLVED UPSTREAM
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: print-dialog (show other bugs)
Version: 4.14.0
Platform: Debian stable Linux
: NOR wishlist
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-08 13:10 UTC by Michael Weghorn
Modified: 2015-09-14 07:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
PPD file that contains installable Options (71.20 KB, text/plain)
2015-09-08 13:12 UTC, Michael Weghorn
Details
Screenshot of the installable options in the print dialog (64.28 KB, image/png)
2015-09-08 13:13 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2015-09-08 13:10:15 UTC
PPD files are a common way to to describe different options supported by a printer.
Some printer models have optional hardware features and accessories that can be present or not (e.g. finishers, additional paper trays, etc.). The PPD specification defines the keyword "InstallableOptions" for a PPD option group that contains such options (s. section 5.4 in version 4.3 of the PPD specification) [1].

KDE's print dialog on Linux currently shows the "Installable Options". Thus a user can override the system-wide settings for those options using the print dialog (e.g. specify that the printer has a duplexer installed while it actually has not). While allowing the user to set individual values for most print options (like resolution, colour mode, ...), I think it would be better not to display the "Installable options".

As the values set for the installable options describe the actual hardware setup, they need to be changed only if the actual printer hardware configuration changes (e.g. an additional paper tray, finisher or duplexer is installed). They are not specific to individual print jobs.

Because of this, they are most probably best handled in the system-wide configuration to avoid that users accidently set wrong values for those options which may lead to unpredictable behaviour on the target device.


The PPD specification says about "Installable Options" (in section 5.4):
"[...] The PPD specification provides a way to describe these 
accessories, to label
them as optional and initially not installed, and a way to install them 
later.
Thus an application can list the installable options in its user 
interface, but
can display them in some special way (for instance, grayed out) to 
indicate
that the basic configuration does not support them. [...]"


I asked on the CUPS mailing list how installable options should be handled in an application's print dialog [2].
Michael Sweet (primary CUPS developer) replied there [3]:

"Generally speaking, we recommend that applications/toolkits *not* show installable options in the print dialog, and we provide API to determine whether a given option or choice is available (ppdInstallableConflict)."

The Gtk+ print dialog, for instance, also does not show these options.

[1] http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf
[2] http://www.cups.org/pipermail/cups/2015-September/027112.html
[3] http://www.cups.org/pipermail/cups/2015-September/027124.html

Reproducible: Always

Steps to Reproduce:
1. set up a (pseudo) printer "test-printer" with a PPD that contains "Installabe Options", e.g. using the following command (no real printer is needed):
sudo lpadmin -p test-printer -v ipp://printer1.example.org/ipp -E -P Ricoh-MP_C3503-pxlcolor-Ricoh.ppd
2. start a KDE application (e.g. Okular)
3. open print dialog using "File" -> "Print" or Ctrl+P
4. select the printer "test-printer"
5. go to "Properties" -> "Advanced"

Actual Results:  
The "Installable Options" (for the attached PPD: "Large Capacity Tray", "Option Tray", "Internal ShiftTray", "Internal Tray 2", "External Tray", "Finisher") are shown and their values can be changed.

Expected Results:  
The "Installable Options" are either not shown at all or cannot be changed (e.g. they are greyed out).
Comment 1 Michael Weghorn 2015-09-08 13:12:39 UTC
Created attachment 94470 [details]
PPD file that contains installable Options
Comment 2 Michael Weghorn 2015-09-08 13:13:13 UTC
Created attachment 94471 [details]
Screenshot of the installable options in the print dialog
Comment 3 Albert Astals Cid 2015-09-08 21:35:18 UTC
That dialog comes from Qt, there's sadly nothing we can do to fix that.
Comment 4 Michael Weghorn 2015-09-14 07:37:21 UTC
(In reply to Albert Astals Cid from comment #3)
> That dialog comes from Qt, there's sadly nothing we can do to fix that.

Thank you for the information.
It does not seem to make sense to file a bug against Qt, because Qt 5 is not affected.
PPD-specific options are currently not at all available in the Qt 5 print dialog (s. [1]) and for Qt 4, only security-related fixes are provided and accepted [2].

[1] http://lists.qt-project.org/pipermail/interest/2015-September/018694.html
[2] http://comments.gmane.org/gmane.comp.lib.qt.devel/22946