Bug 705153 - PDFShuffler displays only black squares
Summary: PDFShuffler displays only black squares
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pdfshuffler
Version: 15
Hardware: i686
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-16 19:40 UTC by Steven Stern
Modified: 2011-12-21 23:23 UTC (History)
5 users (show)

Fixed In Version: pypoppler-0.12.1-12.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 769732 (view as bug list)
Environment:
Last Closed: 2011-07-26 03:45:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
screen shot showing black boxes instead of PDF content (149.42 KB, image/png)
2011-05-28 17:18 UTC, Steven Stern
no flags Details
Spec file to rebuild pypoppler for pdfshuffler (3.53 KB, text/x-rpm-spec)
2011-07-10 09:18 UTC, Nicholas Kudriavtsev
no flags Details

Description Steven Stern 2011-05-16 19:40:05 UTC
Since upgrading from F14 to F15, PDFShuffler displays only black squares when importing PDF documents.  PDF page contents are not visible.

pdfshuffler.noarch 0:0.5.1-1.fc15

Comment 1 Gianluca Cecchi 2011-05-17 15:12:20 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

Comment 2 Steven Stern 2011-05-28 16:58:32 UTC
ping?

Comment 3 Steven Stern 2011-05-28 17:18:06 UTC
Created attachment 501501 [details]
screen shot showing black boxes instead of PDF content

Comment 4 Nicholas Kudriavtsev 2011-05-29 17:45:39 UTC
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

Comment 6 Nicholas Kudriavtsev 2011-06-07 18:40:40 UTC
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?

Comment 7 Nicholas Kudriavtsev 2011-06-12 12:46:42 UTC
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!

Comment 8 Nicholas Kudriavtsev 2011-07-10 09:10:53 UTC
I've rebuilt pypoppler without 76_75.diff and pdfshuffler starts work as expected.

What are we waiting for?

Comment 9 Nicholas Kudriavtsev 2011-07-10 09:18:20 UTC
Created attachment 512072 [details]
Spec file to rebuild pypoppler for pdfshuffler

Comment 10 Fabian Affolter 2011-07-14 15:03:57 UTC
Thanks

Comment 11 Fedora Update System 2011-07-14 15:54:10 UTC
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

Comment 12 Fedora Update System 2011-07-15 01:28:54 UTC
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).

Comment 13 Fedora Update System 2011-07-26 03:45:05 UTC
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.

Comment 14 Kent Knudsen 2011-12-21 23:23:36 UTC
Reopened as Bug 769732 - Bug is now on Fedora 16


Note You need to log in before you can comment on or make changes to this bug.