White semi-transparent partial overlay when editing PDFs

Summary:

I often use Inkscape to edit PDFs to shrink the size of the document to the size of the actual content (e.g. when exporting Graphs from LibreOffice Calc or when building figures in Draw). Most of the time this works great, but under some circumstances I can't completely figure out I have a very strange issue: most PDF viewers (except those part of Browsers) will show a very strange white semi-transparent overlay coming from the right and from the top and covering about the first quarter of the content (see attachments).

At the moment I'm building figures for a thesis in LO Draw and since there is no option for every page to have a different size I resize them with Inkscape and this issue reproducible appears on both Inkscape 1.1.2 on Pop!_OS 22.04 and on Inkscape 1.2 on Windows 10. But when I tried to create a mockup by putting a test Image from Wikipedia in Draw, export it and resize the PDF with Inkscape, the error didn't appear. The error also doesn't appear when exporting as svg.

Steps to reproduce:

  • Copy images from a Word file (docx) I got the images in into LO Draw (also happens when converting the docx to odt)
  • Export the final figure as PDF
  • open the PDF in Inkscape
  • ungroup elements
  • delete background
  • resize document to the size of the content
  • save the result

What happened?

See the difference between Inkscape_Test.pdf and Inkscape_Test2.pdf

Inkscape_Test.pdf

Inkscape_Test2.svg

Inkscape_Test2.pdf

What should have happened?

no strange overlay like when exporting as svg

Version info

Inkscape 1.1.2 (0a00cf5339, 2022-02-04)

    GLib version:     2.72.1
    GTK version:      3.24.33
    glibmm version:   2.66.2
    gtkmm version:    3.24.5
    libxml2 version:  2.9.13
    libxslt version:  1.1.34
    Cairo version:    1.16.0
    Pango version:    1.50.6
    HarfBuzz version: 2.7.4
    Poppler version:  22.02.0

    OS version:       Pop!_OS 22.04 LTS


Inkscape 1.2 (dc2aedaf03, 2022-05-15)

    GLib version:     2.72.1
    GTK version:      3.24.33
    glibmm version:   2.66.4
    gtkmm version:    3.24.6
    libxml2 version:  2.9.14
    libxslt version:  1.1.35
    Cairo version:    1.17.6
    Pango version:    1.50.7
    HarfBuzz version: 4.2.1

    OS version:       Windows 10 21H2