Skip to content

Printing using xdg-desktop-portal's print dialog causes the output being scaled (a lot) smaller

Summary:

When printing something with Inkscape having GTK_USE_PORTAL=1 exported, the printed output is scaled and way too small. I noticed this after having printed a document with Inkscape for the first time after quite some time. I first thought this was a KDE/Plasma 6 regression, thus I filed a respective bug report: https://bugs.kde.org/show_bug.cgi?id=492681

However, I now remembered that here's an issue asking for inclusion of xdg-desktop-portal at all I commented ca. a year ago: #783 (comment 1642923028) – seems like this was not introduced until recently. I'm on KDE/Plasma, and I export GTK_USE_PORTAL=1 through .config/plasma-workspace/env/, so as some point, apparently Inkscape picked that up and showed me my native print dialog without me actually noticing this.

However, as this never happened formerly using GTK dialogs and this is apparently a new feature of Inkscape, I now think this might actually be an upstream issue.

I see this using Inkscape 1.3.2, xdg-desktop-portal 1.18.4 and xdg-desktop-portal-kde 6.1.5, on different machines, printers and drivers (with slightly different results though):

Steps to reproduce (not using xdg-desktop-portal for reference):

  • Start Inkscape from a console using GTK_USE_PORTAL=0 inkscape
  • Draw a 10 x 10 cm square
  • Print it

What happened?

  • The printed square has almost exactly a width and height of 10 cm

Steps to reproduce (using xdg-desktop-portal, to see the issue):

  • Start Inkscape from a console using GTK_USE_PORTAL=1 inkscape
  • Draw a 10 x 10 cm square
  • Print it

What happened?

The printed square is smaller than 10 x 10 cm, this depends on the machine/printer I use:

  • On two machines, one running Gentoo and one running Artix, I get a 48 x 48 mm square
  • This does not seem to depend on the printer, nor on the driver used. I have three printers available, and one can be used with a vendor driver as well as driverless (IP everywhere). I get the very same result for: Brother HL-1230 + BrGenML1, Brother MFC-7440N + BrGenML1, Brother HL-L2370DN + brlaser v6 and Brother HL-L2370DN + IP Everywhere (driverless)
  • Interestingly, on another machine running Artix and speaking to a Brother MFC-8880DN using BrGenML1, the printed size is different (ca 90 x 90 mm), but still scaled smaller

What should have happened?

The printed output should obviously be identical, no matter if I export GTK_USE_PORTAL=1 or not.

Version info

  • Inkscape 1.3.2
  • xdg-desktop-portal 1.18.4
  • xdg-desktop-portal-kde 6.1.5
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information