On my unstable amd64 system I recently tried to use pdfshuffler to rearrange some PDF files and when the files were imported they imported the pages showed up as black squares instead of thumbnails. A little web searching led to this Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=705153 Looking at the Gentoo ebuild the patch that was removed from the Fedora RPM is present in the Gentoo ebuild. Reproducible: Always Steps to Reproduce: 1.Open pdfshuffler on an unstable gentoo system 2.Import a PDF Actual Results: Black squares for displayed in place of thumbnails. Expected Results: Actual thumbnails are displayed.
I made a local -r2 ebuild that removed the patch the was removed in the Fedora solution to this issue and pdfshuffler is working for me again.
I can confirm both the original issue and the fix, on x86.
Created attachment 285891 [details, diff] draw to pixbuf with cairo The above comments are just about half right, as the don't touch one important issue: upcoming release of poppler 0.18.0 will remove poppler_page_render_to_pixbuf{,_for_printing}. As per poppler devs' advice, the solution is to take the old code from poppler to create that override. So, this patch *should* work - it's meant to replace python-poppler-0.12.1-76_75.diff. Please test if it works. Though I'm not saying this will be the *only* thing to fix for poppler 0.18 (poppler_page_get_thumbnail_pixbuf and poppler_page_render_selection_to_pixbuf will be gone too, but pdfshuffler doesn't use those).
Created attachment 288257 [details, diff] patch dropping two poppler gdk-dependent functions OK, now that poppler 0.18 went into the tree, it's (as I mentioned) incompatible with python-poppler. This patch will drop the two functions, that aren't used by pdfshuffler. The other two are handled by the previous patch. This will make python-poppler build a working version of itself. Obviously, the question is: should python-poppler provide the other two (from the previous patch) or should it push the cairo_surface <-> GdkPixbuf conversion on downstream (i.e. pdfshuffler).
On unrelated note - would be convenient if some of the fields (i.e. "Blocks") could be edited from "Add an attachment" section.
Created attachment 288261 [details, diff] plug some leaks One more patch - from a launchpad bug (316722)- that plugs a few leaks in python-poppler.
And please add append-ldflags -Wl,-z,defs so that the package won't fake working when it has undefined references.
(In reply to comment #7) > And please add > > append-ldflags -Wl,-z,defs > > so that the package won't fake working when it has undefined references. Not really a solution here (at least, I don't think so) - that's a python module and those are pretty fine with undefined symbols (those provided by python upon module load).
*** Bug 388331 has been marked as a duplicate of this bug. ***
(In reply to comment #6) > One more patch - from a launchpad bug (316722)- that plugs a few leaks in > python-poppler. In response to the issue listed at duplicate Bug 388331, I've used the three patches posted here by Rafał Mużyło in Comment 3, Comment 4, and Comment 6. I'll attach an updated ebuild next. I had to eliminate the patch python-poppler-0.12.1-76_75.diff as its functionality is duplicated in python-poppler-0.12.1-cairo-drawing-fix.patch (I believe). I emerged python-poppler so I could install gimagereader from the sabayon layman overlay. HTH. Clemmitt
Created attachment 293595 [details] python-poppler-0.12.1-r2.ebuild Updated ebuild. This just incorporates the three patches provided above.
Any news on this? The updated ebuild using the three patches works for me (at least it fixes the original problem (pdfshuffler) on my side.
To be honest, I'd consider patch I dropped into bug 390607 comment 8, combined with removing render_to_pixbuf{,_for_printing} methods a better *short* term solution (the apps stil using it will simply need to get fixed) and the long term lies in completing the second patch (it's already somewhat working, but I'm nearly sure it's incomplete). Perhaps importing the loading progressbar from upstream repo would be a good idea too.
*** Bug 399095 has been marked as a duplicate of this bug. ***
Ping- what's happening here? AFAIK this is the last known problem with poppler-0.18 ...
I can confirm, that the three patches solve the problem for pdfshuffler. It starts fine and all pages are displayed correctly (i.e. no black rectangles). I used the three patches on top of current python-poppler-0.12.1-r2.
I've added a patch from Fedora which just removes 4 functions/methods that were removed from Poppler. This should make things at least not crash. I'll fix up pdfshuffler and (if necessary) app-misc/gourmet (the only two things that depend on python-poppler in gentoo-x86). I glanced at the patch from comment #6, but it looks like it has not been committed upstream yet. Can you file a separate bug for this if you really think gentoo needs to pick it up? I've also added a dependency on <poppler-0.18 to the older python-poppler ebuilds in order to crash less. Marking fixed, please file separate bugs if the API removal breaks other apps so we can fix those.