Bug 493163 - Wrong rendering of some PDF files.
Summary: Wrong rendering of some PDF files.
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-15 15:50 UTC by njuanchi
Modified: 2024-09-16 23:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description njuanchi 2024-09-15 15:50:27 UTC
SUMMARY
Some PDF files are rendered "incorrectly" or rather on a very difficult way for us to read them.

STEPS TO REPRODUCE
1. Open a PDF file with these characteristics.
2. See how it is pretty much unreadable.
3. See comparisons here:
Default PDF viewer from Linux Mint: https://images2.imgbox.com/bd/8b/qFzQQ3cP_o.png
Okular: https://images2.imgbox.com/35/e0/SiEpq6OO_o.png
Default PDF viewer: https://images2.imgbox.com/6d/44/0Cf4ul3p_o.png
Okular: https://images2.imgbox.com/70/bc/uM6JJmUR_o.png

OBSERVED RESULT
PDF's are rendered incorrectly.

EXPECTED RESULT
Correct rendering so as to be able to read them.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux Mint 20.3 Cinnamon.
KDE Plasma Version: -.
KDE Frameworks Version: 5.68.0. 
Qt Version: 5.12.8.
xcb window system.

ADDITIONAL INFORMATION
Wrong rendered files are provided for reference and testing if needed: aHR0cHM6Ly9tZWdhLm56L2ZpbGUvTmlGV0FBSWEjU09xZTgtdmJUSm02YWVETkQyMU1GU3pHcWdabnl1R2tuS2xyX0JsbVA5MA==
aHR0cHM6Ly9tZWdhLm56L2ZpbGUva2lrMjFTWUEjd2xYUFlRQXNQYjdwckN1Umdvdk9jVUt1NE1FMFdPUmx2NUdPUlkyOWh2aw==
(base64).
Comment 1 Albert Astals Cid 2024-09-15 21:44:27 UTC
Without files this is not actionable.
Comment 2 njuanchi 2024-09-16 13:50:43 UTC
(In reply to Albert Astals Cid from comment #1)
> Without files this is not actionable.

The files are provided at the end.
Comment 3 Albert Astals Cid 2024-09-16 17:25:18 UTC
You can add links you know, there's no need to be fancy and hide links in base64, just makes our life harder.
Comment 4 Albert Astals Cid 2024-09-16 17:35:45 UTC
We do not do pdf rendering ourself, poppler does, you can go and file a bug at https://poppler.freedesktop.org/ but let me tell you this is 99% unfixable because it's not really a bug, those PDF files are scanned images, and contain LOTS OF NOISE, see a zoomed section here https://i.imgur.com/UaKtRx2.png When less zoomed the rendering engine has to decide what to do with all those "random" dots, and well it seems some engines do something you like better and some something you like worse.

As an example try firefox, at least here at 100% it's acceptable https://i.imgur.com/Dfm0feQ.png but at 110% looks really bad https://i.imgur.com/jSciNYl.png
Comment 5 njuanchi 2024-09-16 23:45:46 UTC
(In reply to Albert Astals Cid from comment #3)
> You can add links you know, there's no need to be fancy and hide links in
> base64, just makes our life harder.
Had not seen the field, sorry, my bad.

(In reply to Albert Astals Cid from comment #4)
> We do not do pdf rendering ourself, poppler does, you can go and file a bug
> at https://poppler.freedesktop.org/ but let me tell you this is 99%
> unfixable because it's not really a bug, those PDF files are scanned images,
> and contain LOTS OF NOISE, see a zoomed section here
> https://i.imgur.com/UaKtRx2.png When less zoomed the rendering engine has to
> decide what to do with all those "random" dots, and well it seems some
> engines do something you like better and some something you like worse.
> 
> As an example try firefox, at least here at 100% it's acceptable
> https://i.imgur.com/Dfm0feQ.png but at 110% looks really bad
> https://i.imgur.com/jSciNYl.png
I see what you mean. I guess it does depend on the zoom, so there's not much to do. Guess I'll file the bug anyways just in case. Thank you for the help and explanation!