Created attachment 154078 [details] example of the pdf page Okular views as blank Okular cannot see the content of many pages of an old scanned book. they appear blank although many other tools can see them just fine (internet browser except Falkon, Adobe Reader, Foxit, Master PDF, WPS PDF, LibreOffice Draw, ImageMagick, mupdf, PDF Studio Viewer). The problem seems to be with poppler, because qpdfviewer and Falkon have the same problem. As far as I could test Evince cannot even open that pdf. I couldn't get technical details on that type of page, so I'll upload here a sample. More details at links posted here: https://www.reddit.com/r/kde/comments/z591ia/how_come_only_okular_cannot_see_this_pdf_page/?utm_source=share&utm_medium=web2x&context=3
> internet browser except Falkon, Adobe Reader, Foxit, Master PDF, WPS PDF, LibreOffice Draw, ImageMagick, mupdf, PDF Studio Viewer What I mean is: only Okular, qpdfview, Falkon and Evince seem affected; the rest of the tools that I've tested (internet browsers - excepting Falkon -, Adobe Reader, Foxit, Master PDF, WPS PDF, LibreOffice Draw, ImageMagick, mupdf, PDF Studio Viewer) are not affected.
Comment on attachment 154078 [details] example of the pdf page Okular views as blank Open that in Okular or qpdfview: only a footer is see. Open it in an internet browser other than Falkon, in adobe Reader, Foxit reader, mupdf, Master pdf etc and the page is seen in full.
If that page is printed as pdf in Firefox or (after selecting "print as image") in Chromium/Chrome-based browsers, the resulting pdf is seen ok in Okular.
When opening that file poppler prints "Bogus memory allocation size". Presumably because the embedded image data is too large in some way. The allocation seems to come from https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/poppler/JBIG2Stream.cc#L1575 numInputSyms is 0, numNewSyms is 3092673499. 3092673499 is larger than 2^31 and smaller than 2^32. It is stored as unsigned int, so that's fine, but when passing that to gmallocn_checkoverflow it gets converted to int causing an overflow. Once it reaches https://gitlab.freedesktop.org/poppler/poppler/-/blob/master/goo/gmem.h#L112 count is -1202293797 and the allocation fails
Can you post a poppler bug for this, please?
(In reply to Oliver Sander from comment #5) > Can you post a poppler bug for this, please? Are you addressing me or the previous comment? Should I post that bug?
Yes please. You should be able to reproduce the bug with the `pdftoppm` tool (which is part of poppler). That way, your bug report becomes independent from Okular.
(In reply to Oliver Sander from comment #7) > Yes please. You should be able to reproduce the bug with the `pdftoppm` > tool (which is part of poppler). That way, your bug report becomes > independent from Okular. I see, I have tested with Atril and Evince and they are no better than Okular, clearly this is not Okular-specific.
(In reply to Oliver Sander from comment #7) > Yes please. You should be able to reproduce the bug with the `pdftoppm` > tool (which is part of poppler). That way, your bug report becomes > independent from Okular. Sorry, what is the exact package affected by the bug? Is it called "poppler"? Or "poppler-utils"? Should the bug report be posted here? Or because it'd not a kde bug must be posted under a different bug-reporting website?
(In reply to Oliver Sander from comment #7) > Yes please. You should be able to reproduce the bug with the `pdftoppm` > tool (which is part of poppler). That way, your bug report becomes > independent from Okular. I have posted as a popple bug here: https://gitlab.freedesktop.org/poppler/poppler/-/issues/1319
Thanks for creating the poppler bug report. I will close this then