freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
41 stars 39 forks source link

Switch printer front-end for SecureDrop Workstation #2156

Open eloquence opened 5 years ago

eloquence commented 5 years ago

The current proof-of-concept printing implementation in freedomofpress/securedrop-workstation#277 uses xpp as a printer front-end. We should compare this with other front-end options in terms of:

and then make a final decision about what front-end to use for the beta.

eloquence commented 5 years ago
Screenshots of all dialogs in xpp (taken on Ubuntu 18.04): ![Screenshot from 2019-07-18 15-46-59](https://user-images.githubusercontent.com/213636/61497135-61e15000-a973-11e9-9f86-93ea3e119c57.png) ![Screenshot from 2019-07-18 15-47-02](https://user-images.githubusercontent.com/213636/61497134-61e15000-a973-11e9-8afc-73f17fa30507.png) ![Screenshot from 2019-07-18 15-47-04](https://user-images.githubusercontent.com/213636/61497133-6148b980-a973-11e9-8723-e18b02b1810a.png) ![Screenshot from 2019-07-18 15-47-07](https://user-images.githubusercontent.com/213636/61497131-6148b980-a973-11e9-8768-20db7fb77db9.png) ![Screenshot from 2019-07-18 15-47-10](https://user-images.githubusercontent.com/213636/61497130-6148b980-a973-11e9-84fb-3bf0e03bb3fd.png) ![Screenshot from 2019-07-18 15-47-12](https://user-images.githubusercontent.com/213636/61497128-6148b980-a973-11e9-8f4f-efeb85855e38.png) ![Screenshot from 2019-07-18 15-47-17](https://user-images.githubusercontent.com/213636/61497127-6148b980-a973-11e9-9c6d-084d84d7dacb.png) ![Screenshot from 2019-07-18 15-47-25](https://user-images.githubusercontent.com/213636/61497126-6148b980-a973-11e9-90f8-446b74736d68.png)
Screenshots of all dialogs in gpr (taken on Ubuntu 18.04; cannot show "Configuration" options without configuring a PPD printer) ![Screenshot from 2019-07-18 15-49-48](https://user-images.githubusercontent.com/213636/61497271-c7354100-a973-11e9-8fc7-7787fc7d1bfa.png) ![Screenshot from 2019-07-18 15-49-41](https://user-images.githubusercontent.com/213636/61497272-c7cdd780-a973-11e9-8da8-1dc5b4b815cb.png)
Screenshots of all dialogs in gtkpl (taken on Ubuntu 18.04) ![Screenshot from 2019-07-18 15-51-49](https://user-images.githubusercontent.com/213636/61497389-15e2db00-a974-11e9-8954-65b893d9d65e.png) ![Screenshot from 2019-07-18 15-51-52](https://user-images.githubusercontent.com/213636/61497388-15e2db00-a974-11e9-8c7a-ed0dd1796234.png) ![Screenshot from 2019-07-18 15-51-56](https://user-images.githubusercontent.com/213636/61497387-154a4480-a974-11e9-9e0f-7a2066e37ba2.png) ![Screenshot from 2019-07-18 15-51-58](https://user-images.githubusercontent.com/213636/61497386-154a4480-a974-11e9-95ce-8031577e7735.png) ![Screenshot from 2019-07-18 15-52-01](https://user-images.githubusercontent.com/213636/61497385-154a4480-a974-11e9-990d-17b875e2eb92.png) ![Screenshot from 2019-07-18 15-52-04](https://user-images.githubusercontent.com/213636/61497384-154a4480-a974-11e9-9c3b-c2501f05a419.png) ![Screenshot from 2019-07-18 15-52-07](https://user-images.githubusercontent.com/213636/61497383-154a4480-a974-11e9-8684-c1071b1f8292.png) ![Screenshot from 2019-07-18 15-52-09](https://user-images.githubusercontent.com/213636/61497382-154a4480-a974-11e9-9d9a-84ac36b7e87d.png) ![Screenshot from 2019-07-18 15-52-11](https://user-images.githubusercontent.com/213636/61497380-14b1ae00-a974-11e9-91fb-f67b79d39124.png)
eloquence commented 5 years ago

I have excluded kprinter4, the KDE printing utility available in Ubuntu 18.04, because a) I was not able to get it to actually run, b) the dependencies likely make it prohibitive to install.

Another option that I think is worth considering, however, is to create a very lightweight wrapper around GTK's printing dialog, in combination with the Poppler PDF library or a PostScript library. I was able to use this example code to print PDFs with the GTK dialogs. Here are the GTK dialogs for comparison with the above front-ends, including an example of a preview:

GTK dialogs based on simple Python script using GLib, Gtk, and Poppler ![Screenshot from 2019-07-18 16-09-27](https://user-images.githubusercontent.com/213636/61498045-8854ba80-a976-11e9-8874-ce6ec795a0c8.png) ![Screenshot from 2019-07-18 16-09-30](https://user-images.githubusercontent.com/213636/61498046-8854ba80-a976-11e9-99a3-793880b5df71.png) ![Screenshot from 2019-07-18 16-09-32](https://user-images.githubusercontent.com/213636/61498047-88ed5100-a976-11e9-8e19-e3f645bafccb.png) ![Screenshot from 2019-07-18 16-09-36](https://user-images.githubusercontent.com/213636/61498048-88ed5100-a976-11e9-9ce3-76021a07f6fd.png) ![Screenshot from 2019-07-18 16-09-39](https://user-images.githubusercontent.com/213636/61498049-88ed5100-a976-11e9-9a85-89b54cc8f69d.png) ![Screenshot from 2019-07-18 15-57-06](https://user-images.githubusercontent.com/213636/61497577-c4871b80-a974-11e9-9fd9-0039df22e459.png)

If we used this option, we'd have to "just" find a way to convert every supported file format to PDF prior to printing, but we're already doing some processing to get files to work with lpr.

eloquence commented 5 years ago

NB: I would argue that all the above choices, with the possible exception of gpr, satisfy the must-have requirements for a first iteration:

I did not find a print quality option in gpr, but it's possible that this is available in the printer options when a PPD printer is configured. In terms of aesthetics and usability, I think the GTK dialogs are clearly preferable to all other options, using clearer labeling, sensible font and color choices, and making the most common choices (e.g., page range selection) immediately available. It's also most similar to printer dialogs on other operating systems and applications.

kushaldas commented 4 years ago

We should discuss this soon. The UI of the current xpp is really bad and I could not find any preview option.

eloquence commented 2 years ago

Update from 2022-08-11 review with @tina-ux @nathandyer @l3th3 @eloquence @zenmonkeykstop:

zenmonkeykstop commented 5 months ago

Still an open issue - we have added xpp to our bookworm apt repo to make it available for 4.2, but it should get replaced.

deeplow commented 3 weeks ago

I got the chance to talk to the lead maintainer of OpenPrinting. I found out that XPP as the front-end in fact does very little. All that it does is surface to the user the printer and document options. CUPS does the remaining processing. However, as we know, some formats CUPS cannot understand. That's why we're already converting LibreOffice files to PDF (which is exactly what the LibreOffice print dialogue does before sending it to cups).

GTK dialogs based on simple Python script using GLib, Gtk, and Poppler

I couldn't find any minimally modern-looking print dialogues, so if this dialogue minimally satisfies our needs, it could be a way to go, if we end up going with the "simply replace XPP approach" (which may only be a temporary solution).

But it is not as complicated as I was originally thinking since it doesn't actually require implementing non-PDF file converters. (CC @zenmonkeykstop).