Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 920355

Summary: app-text/poppler: Use cairo backend on poppler for qt applications (okular etc) for pdf rendering
Product: Gentoo Linux Reporter: Miroslaw Mieszczak <gentoo>
Component: Current packagesAssignee: Maciej Mrozowski <reavertm>
Status: UNCONFIRMED ---    
Severity: minor CC: kde, orzel, printing, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://forums.gentoo.org/viewtopic-p-8373542.html
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=25240
https://gitlab.freedesktop.org/poppler/poppler/issues/435
https://bugs.gentoo.org/show_bug.cgi?id=568000
https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/546
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch 1
Patch 2
Patch 3

Description Miroslaw Mieszczak 2023-12-20 07:34:51 UTC
Since many years poppler use splash backend to render pdf files for qt applications. This backend isn't developed anymore for many years. 
Thus big pdf files looks in okular like a shit. Especially, when there is necessity of zooming in/out.
Because many years ago developer of poppler rejected to change his software to support cairo backend on qt applications, it is necessary to patch it to use right backend. 
The results are amazing.
Some distribution use a patch for poppler to change backend for qt.

Reproducible: Always

Steps to Reproduce:
1.open huge pdf file in okular.
2.Zoom in displayed file. 
3.See what happen on screen while zooming in/out
Actual Results:  
While zooming in on screen appear garbage, and several seconds later, the contents of the screen will be updated.

Expected Results:  
Smooth zoom in of the screen contents of displayed pdf file, without any garbage artifacts on the screen. This is especially important, when one make a presentation for customers.

https://github.com/giddie/poppler-cairo-backend
Comment 1 Miroslaw Mieszczak 2023-12-20 07:36:10 UTC
Created attachment 880027 [details, diff]
Patch 1
Comment 2 Miroslaw Mieszczak 2023-12-20 07:36:25 UTC
Created attachment 880028 [details, diff]
Patch 2
Comment 3 Miroslaw Mieszczak 2023-12-20 07:36:44 UTC
Created attachment 880029 [details, diff]
Patch 3
Comment 4 Miroslaw Mieszczak 2023-12-20 07:38:15 UTC
Right now all above patches apply clearly. 
I had to modify some of them to get applied on last stable poppler version. 
It works fine.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-20 07:48:13 UTC
It looks like once upon a time, we might have had them (bug 568000).

I sympathise quite a bit with the request here, to the extent that I think we should consider it with a (perhaps masked) USE flag, with no guarantee of us keeping it indefinitely and I do not promise to check if they apply on bumps myself.

I will see what asturm and others say.

Anyway, we had this once upon a time, but it got dropped in:

commit 533ccd1da3f2c570a4b98f37d4b57741f284cbdf
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Fri Feb 17 14:00:38 2017 +0100

    app-text/poppler: Bump to version 0.52.0

    Removed cairo-qt support as the patches don't apply anymore.

    Package-Manager: Portage-2.3.3, Repoman-2.3.1
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-20 07:51:34 UTC
https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/546#note_1782554 in particular is compelling.