Bug 94022 - Hide "Installable Options" in Linux print dialog
Summary: Hide "Installable Options" in Linux print dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other Linux (All)
: medium enhancement
Assignee: Michael Weghorn
URL:
Whiteboard: target:5.1.0 target:5.0.4
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-08 12:17 UTC by Michael Weghorn
Modified: 2016-10-25 19:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
PPD file that contains installable Options (71.20 KB, text/plain)
2015-09-08 12:35 UTC, Michael Weghorn
Details
Screenshot of the print dialog (34.14 KB, image/png)
2015-09-08 12:36 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 12:17:47 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].

As far as I can see, LibreOffice's print dialog on Linux currently shows all options given in the PPD file, including 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 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
Comment 1 Michael Weghorn 2015-09-08 12:20:30 UTC
Possibly, Mac OS X and other Unix-like systems are affected as well (in addition to GNU/Linux).
Comment 2 Michael Weghorn 2015-09-08 12:34:17 UTC
The following steps show how to see the described behaviour:

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 LibreOffice
3) open print dialog using "File" -> "Print" or Ctrl+P
4) select the printer "test-printer"
5) go to "Properties" -> "Device"

Observed result:
The "Installable Options" (for the attached PPD: "LargeCapacityTray", "OptionTray", "ShiftTray", "InnerTray", "ExternalTray", "Finisher") are shown and their values can be changed.

Desired result:
The "Installable Options" are either not shown at all or cannot be changed (e.g. they are greyed out).
Comment 3 Michael Weghorn 2015-09-08 12:35:13 UTC
Created attachment 118521 [details]
PPD file that contains installable Options
Comment 4 Michael Weghorn 2015-09-08 12:36:35 UTC
Created attachment 118522 [details]
Screenshot of the print dialog

This screenshot shows that another finisher can be set. It was made with LibreOffice 4.3, but the behaviour is still the same in a recent daily build.
Comment 5 Commit Notification 2015-10-27 12:27:21 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f8d0dc09e15b36ae83a5e89280d1f7fbc01da48b

tdf#94022 Print dialog: hide Installable Options

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2015-10-28 12:49:02 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f03a169d2311ed4337103d19f33173e997d0f40&h=libreoffice-5-0

tdf#94022 Print dialog: hide Installable Options

It will be available in 5.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Michael Weghorn 2015-10-28 13:46:52 UTC
This has been implemented by the commits mentionend in comment 5 (LibreOffice "master" branch) and comment 6 (LibreOffice 5.0).
Therefore I am setting the status to "RESOLVED FIXED".