Bug 705153
Summary: | PDFShuffler displays only black squares | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Steven Stern <subscribed-lists> | ||||||
Component: | pdfshuffler | Assignee: | Fabian Affolter <mail> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | urgent | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 15 | CC: | gianluca.cecchi, kent, mail, mjc, nkudriavtsev | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i686 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | pypoppler-0.12.1-12.fc15 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 769732 (view as bug list) | Environment: | |||||||
Last Closed: | 2011-07-26 03:45:10 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Steven Stern
2011-05-16 19:40:05 UTC
same for me. I didn't use it in F14 but I'm using F15 rc3 and pdfshuffler-0.5.1-1.fc15.noarch tried with some pdf documents and I only see a black square for all of them... FWIW I can instead open without any problem them in evince, for example ping? Created attachment 501501 [details]
screen shot showing black boxes instead of PDF content
Here is the error: Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib64/python2.7/threading.py", line 530, in __bootstrap_inner self.run() File "/usr/bin/pdfshuffler", line 964, in run thumbnail = self.load_pdf_thumbnail(pdfdoc, npage, angle, crop) File "/usr/bin/pdfshuffler", line 1010, in load_pdf_thumbnail pixbuf.fill(0xffffffff) NameError: global name 'pixbuf' is not defined The line 1010 is in exception branch, so does not cause the error with black boxes. Change pixbuf.fill to thumbnail.fill eliminates the error "NameError: global name 'pixbuf' is not defined" and blocks turn to white. The cause of the "black" boxes is the line 987 "page.render_to_pixbuf(0,0,pix_w,pix_h,self.scale,0,thumbnail)" in which an exception occurs. I've read there are some changes in poppler's API at 0.16 version. Have those changes reflected in pypoppler 0.12.1? Seems that current pypoppler is broken. I added some debug prints in exception branch of function "load_pdf_thumbnail" in pdfshuffler. Running line 987: page.render_to_pixbuf(0,0,pix_w,pix_h,self.scale,0,thumbnail) I've got the exception: <type 'exceptions.TypeError'> Poppler.Page.render_to_pixbuf() takes at most 6 arguments (7 given) It is a strange, because poppler C function takes SEVEN arguments. Look at http://pkgs.fedoraproject.org/gitweb/?p=pypoppler.git;a=blob;f=76_75.diff;h=3aa6716d6812cc1c0d314649e45a8953c9608dc5;hb=a5019313241294a006ff5d42bfe1be626a290ab2 ([pypoppler.git] / 76_75.diff). It is a patch for poppler.override. There are only six arguments in lines 15 and 21 are extracted from the python function line. The seventh argument - the pixbuf pointer - is omitted and assigned to NULL (line 19). If I try to call thumbnail = page.render_to_pixbuf(0,0,pix_w,pix_h,self.scale,0) I've got the exception: (pdfshuffler:7230): Poppler-CRITICAL **: void poppler_page_render_to_pixbuf(PopplerPage*, int, int, int, int, double, int, GdkPixbuf*): assertion `pixbuf != NULL' failed So, the patch 76_75.diff from pypoppler.git has to be revised! I've rebuilt pypoppler without 76_75.diff and pdfshuffler starts work as expected. What are we waiting for? Created attachment 512072 [details]
Spec file to rebuild pypoppler for pdfshuffler
Thanks pypoppler-0.12.1-12.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/pypoppler-0.12.1-12.fc15 Package pypoppler-0.12.1-12.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pypoppler-0.12.1-12.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/pypoppler-0.12.1-12.fc15 then log in and leave karma (feedback). pypoppler-0.12.1-12.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. Reopened as Bug 769732 - Bug is now on Fedora 16 |