Bug 419944 - Print scaling from Firefox and Thunderbird not possible when using KDE print dialog
Summary: Print scaling from Firefox and Thunderbird not possible when using KDE print ...
Status: RESOLVED UPSTREAM
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-11 08:05 UTC by Nora
Modified: 2022-07-15 15:57 UTC (History)
5 users (show)

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


Attachments
Patch to fix printing multiple copies (1.24 KB, patch)
2020-08-04 14:01 UTC, Jan Grulich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nora 2020-04-11 08:05:41 UTC
SUMMARY
Print scaling in Firefox and Thunderbird is not possible with KDE.
This occures when using Firefox with GTK_USE_PORTAL=1 argument to use KDE file dialogs (also print dialog).
When using GTK dialogs, print scaling is working.

STEPS TO REPRODUCE
1. Having xdg-desktop-portal and xdg-desktop-portal-kde installed
2. Open Firefox/Thunderbird with option GTK_USE_PORTAL=1
3. Make sure KDE print dialog instead of GTK dialog is used when printing
4. Print any file, using print scaling other than 100% or Fit to Page
5. Check printout: printed with specified scaling

OBSERVED RESULT
Print scaling of Firefox and Thunderbird not used, printing always to 100%

EXPECTED RESULT
Print scaling of Firefoxa and Thunderbird used, printing to specified percentage.


SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: Kubuntu 19.10
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION
xdg-desktop-portal 1.4.2-ubuntu1 and xdg-desktop-portal-kde 5.16.5-0ubuntu2
Firefox 75.0 and prior as intalled from Kubuntu Packages
Comment 1 Andrey Kozlovskiy 2020-08-04 12:53:53 UTC
This is a major issue for me too.
Setting the number of copies doesn't work either, only one copy is always printed.
Moreover, KDE dialog lacks header and footer settings that are presented in GTK dialog ('Options' tab).

KDE dialog doesn't work correctly and isn't equivalent to GTK one.
Comment 2 Jan Grulich 2020-08-04 14:01:20 UTC
Created attachment 130629 [details]
Patch to fix printing multiple copies

Hi,

can you try the attached patch and verify you can now print more than one copy? It will work only for printing on a printer, not when you print to a pdf file and I don't have a printer to test this.

Thank you.
Comment 3 Andrey Kozlovskiy 2020-08-04 19:04:54 UTC
Thank you for the patch. I compiled version 5.19.4 of portal-kde from the sources and I can confirm it works for me, it correctly prints as many copies as specified.
Comment 4 Jan Grulich 2020-08-04 19:19:39 UTC
Git commit 2fb7d5bd098216ac19b97918f6f0c0cacc04fcf2 by Jan Grulich.
Committed on 04/08/2020 at 19:17.
Pushed by grulich into branch 'master'.

Print: enable printing of multiple copies

M  +4    -4    src/print.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/2fb7d5bd098216ac19b97918f6f0c0cacc04fcf2
Comment 5 Jan Grulich 2020-08-04 19:20:20 UTC
Git commit 06d1c6874829849210f62f069b93b6c74bcb363c by Jan Grulich.
Committed on 04/08/2020 at 19:20.
Pushed by grulich into branch 'Plasma/5.19'.

Print: enable printing of multiple copies

M  +4    -4    src/print.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/06d1c6874829849210f62f069b93b6c74bcb363c
Comment 6 Nate Graham 2022-01-18 19:48:17 UTC
I fear that this may be an upstream Qt issue, as the Qt dialog does not have a generic print scaling feature; typically it's left up to the apps. Overall the Qt print dialog is in a pretty sorry state.
Comment 7 Nora 2022-01-23 18:51:04 UTC
For print scaling the issue has now lower priority:
Thunderbird 91.5.0 just got the same new "own" print dialog as Firefox. That new own print dialog brings all main printing functions. Qt/KDE print dialog will be only necessary if you need to adjust printer specific settings and therefore klick "Print with system dialog".
Comment 8 Nate Graham 2022-07-15 15:57:43 UTC
Yeah nothing we can do here without changes to the Qt print dialog. Hopefully it can be added there.