Bug 421430 - Okular causes offsets during downscale of document
Summary: Okular causes offsets during downscale of document
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.9.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-12 19:55 UTC by Never Mind
Modified: 2020-05-13 07:47 UTC (History)
2 users (show)

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


Attachments
screenshot at 150% zoom, and scaled to fit the document (38.50 KB, image/png)
2020-05-12 19:55 UTC, Never Mind
Details
Screenshot comparing Okular, Evince and Zathura (29.95 KB, image/png)
2020-05-12 20:51 UTC, Never Mind
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Never Mind 2020-05-12 19:55:13 UTC
Created attachment 128403 [details]
screenshot at 150% zoom, and scaled to fit the document

When a normal sized (DIN A4) document is resized to fit the window vertically, objects within a document are misaligned, causing certain documents such as music sheets to render unreadable.


STEPS TO REPRODUCE
1. Open any DIN-A4 document with high detailed elements such as a music sheet.
2. Fit to window vertically
3. Observe the details (notes in a music sheet) be misaligned, rendering the sheet unreadable

OBSERVED RESULT

Elements of the PDF are misaligned, causing unreadable documents.

EXPECTED RESULT

Elements should be accurately aligned.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: (K)Ubuntu 18.04 and 20.04 tested
KDE Plasma Version: 5.18
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION

Attached screenshot at 150% zoom, and scaled to fit the document
Comment 1 Yuri Chornoivan 2020-05-12 20:01:54 UTC
Can you share a sample PDF file for testing?

BTW Okular does not produce the image itself (but its core library, poppler does. Can you try if Evince (also PDF-based) has the same bug? If so, this should be reported against poppler.

Thanks in advance for your answers.
Comment 2 Never Mind 2020-05-12 20:51:54 UTC
Created attachment 128405 [details]
Screenshot comparing Okular, Evince and Zathura
Comment 3 Never Mind 2020-05-12 20:52:52 UTC
I had tried reading these sheets with Evince and Zathura, both using poppler as backend, and none of them seem to have the same issue when scaling down. I use okular more comfortably due to the interface, but I am forced to switch to Zathura when this issue arises.

I have attached a screenshot of the three, at matching document zoom (notice that evince and okular do not show the same document size on screen when the same zoom % is selected in the app, so different zooms levels were selected until both rendered same pixel sizes 1:1 on screen). Screenshots have not been scaled.
Comment 4 Never Mind 2020-05-12 21:09:58 UTC
I just sent the PDF document from which I took the screenshots privately by e-mail, for debugging purposes. Unfortunately I cannot legally share the document here publicly due to copyright issues. Please do not redistribute the document.

However, you can check the same bug on numerous open documents:

e.g. , I can see certain notes swapped when scaling down on the 2nd page of:

https://files.musopen.org/media/9c0cee4b-0287-439e-850a-396f66b35ac9.pdf?filename=Adagio%20in%20G%20minor%20-%20Complete%20Score%20%28Keyboard%20and%20Violin%29.pdf
Comment 5 Yuri Chornoivan 2020-05-13 07:33:46 UTC
Looks like a poppler-qt rendering bug (qpdfview shows an identical image).
Comment 6 Oliver Sander 2020-05-13 07:47:55 UTC
As a workaround, you may try

  https://invent.kde.org/kde/okular/-/merge_requests/112

which selects a different render backend.

(Apologies for still not having found the time to actually finish that).