Bug 102129

Summary: [PATCH] Arthur backend does not initialize the image with the paper color
Product: poppler Reporter: oliver.sander
Component: arthur backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: oliver.sander
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch that makes Arthur initialize the QImage
Example file to trigger the bug

Description oliver.sander 2017-08-09 09:14:51 UTC
Created attachment 133404 [details] [review]
Patch that makes Arthur initialize the QImage

The Arthur backend does not initialize the QImage it draws onto with the paper color, whereas the Qt documentation clearly states that QImages need to be initialized.  This leads to valgrind errors, rendering artifacts, and the background color always being white no matter what the pdf file says.

The attached simple patch fixes the issue.
Comment 1 Albert Astals Cid 2017-08-09 18:16:25 UTC
Do you have a pdf at hand to prove this is needed?
Comment 2 oliver.sander 2017-08-09 20:13:14 UTC
Sure.  What I did was:
a) Patch Okular to use the Arthur backend
b) Open the attached pdf file
c) Change paper color (in settings --> accessibility) to
   something that is not white.
d) Observe that the paper stays white.
Comment 3 oliver.sander 2017-08-09 20:13:48 UTC
Created attachment 133416 [details]
Example file to trigger the bug
Comment 4 Albert Astals Cid 2017-08-09 21:25:59 UTC
Pushed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.