Bug 506416

Summary: Pages are being incorrectly rendered very small and side by side 3 times on a single page
Product: [Applications] okular Reporter: Kalcifer <izerpizer>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED UPSTREAM    
Severity: critical CC: aacid, kde, kdmw.629
Priority: NOR    
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Bad rendering example
Good rendering of the bad rendering example from pdf.js
KDEBugTriage_Okular_Bug 506416

Description Kalcifer 2025-07-01 00:47:17 UTC
Created attachment 182817 [details]
Bad rendering example

SUMMARY

Some pages in a specific PDF are being incorrectly rendered. A single page is being copied 3 times onto one page side by side. Zooming in doesn't make the text legible. It appears that the text highlighting location isn't lined up with anything real either.

STEPS TO REPRODUCE

Unknown how to reproduce this in general. However there are many examples in the PDF in question at various page numbers by simply viewing them.

OBSERVED RESULT

Rendering broken for a PDF


EXPECTED RESULT

I would expect it to render properly


SOFTWARE/OS VERSIONS
Windows: Untested
macOS: Untested
Linux/KDE Plasma: Arch Linux, Kernel v6.12.35-1-lts
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION

This was also observed in GNOME Evince. This issue was *not* observed in Firefox's PDF viewer (pdf.js).

If you would like to test using the PDF where the issue was obsereved, please use the following method to acquire it (but NOTE: This may be copyright in your region. Please be careful.) :

1. Copy this link: `https://www.scribd.com/document/666821453/TAC-Geometric-Design-Guide-for-Canadian-Roads-2017`
2. Paste it into this tool: https://scribd.vdownloaders.com/
3. Download the PDF (it should be about 123.1 MB).
Comment 1 Kalcifer 2025-07-01 00:48:24 UTC
Created attachment 182818 [details]
Good rendering of the bad rendering example from pdf.js
Comment 2 Kalcifer 2025-07-01 01:17:33 UTC
I've also found that the PDF can't be viewed in Ungoogled Chromium.
Comment 3 kdmw.629 2025-07-01 06:48:27 UTC
Created attachment 182822 [details]
KDEBugTriage_Okular_Bug 506416

Tried to replicate the bug and was successful in Okular and xPDF. This screenshot shows the bug being replicated in xPDF too.
Comment 4 kdmw.629 2025-07-01 06:55:38 UTC
I am not a KDE developer. I am trying to do a KDE Bug Triage (https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging)

I replicated the issue based on the steps given in the Additional section. The PDF file downloaded was 123 MB in size.
It does not render properly in Okular ver 25.04.2. Nor in KDE Falkon 25.04.2.

The PDF does not render properly using xPDFReader ver 4.05 too. Please see the attached screenshot with the name, "KDEBugTriage_Okular_Bug 506416" for more details. The same behavior is observed as is seen in Okular

The PDF renders fine, without any issue, in Mozilla Firefox version 140. 

Maybe something to do with a shared library that Okular and xPDF use to render PDF?
Comment 5 Kalcifer 2025-07-01 06:58:56 UTC
I will note, as I neglected to do so in my initial report, an example page in the PDF I provided where the issue can be observed is page 269. There are many others too, of course.
Comment 6 Sune Vuorela 2025-07-01 11:57:14 UTC
This is likely a bug in poppler. The poppler code is used by Okular and Evince (and many distribution versions of xpdf) to render pdf files.
Comment 7 kdmw.629 2025-07-02 04:17:13 UTC
(In reply to Sune Vuorela from comment #6)
> This is likely a bug in poppler. The poppler code is used by Okular and
> Evince (and many distribution versions of xpdf) to render pdf files.

What other pdf readers and renderers dont use poppler? Do muPDF or xReader or zathura or Sioyek use poppler?

qpdfview uses poppler. 

If we find one more acrobat reader which does not use poppler then we can use it to confirm how the pdf renders.
Comment 8 Sune Vuorela 2025-07-02 07:00:31 UTC
(In reply to kdmw.629 from comment #7)
> What other pdf readers and renderers dont use poppler? Do muPDF or xReader
> or zathura or Sioyek use poppler?

I don't think mupdf uses poppler. sioyek uses an old mupdf.
xreader does use poppler.  Zathura uses either mupdf or poppler.

The the pdf viewers in your browser likely does not use poppler, neither does acrobat reader (windows).
Comment 9 Albert Astals Cid 2025-07-02 20:39:36 UTC
It is a poppler bug.

If you do
pdftoppm -f 306 -l 306 -png ilide.info-tac-geometric-design-guide-for-canadian-roads-2017-pr_9dd597aece08dc2c946ef94a41cd9f15.pdf blo
you can then open the blo-0306.png file and it will be badly rendered too.

 Please file it at https://gitlab.freedesktop.org/poppler/poppler/-/issues
Comment 10 Kalcifer 2025-07-02 22:52:56 UTC
(In reply to Albert Astals Cid from comment #9)

>  Please file it at https://gitlab.freedesktop.org/poppler/poppler/-/issues

Done: I have reported it [here](https://gitlab.freedesktop.org/poppler/poppler/-/issues/1607).