[gutsy] [regression] pdf rendering not working
Bug #137944 reported by
Vincenzo Ciancia
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xournal (Ubuntu) |
Fix Released
|
Undecided
|
Vincenzo Ciancia | ||
Bug Description
Binary package hint: xournal
I thought this only was a bug with 0.4 version, but xournal is no longer importing pdfs in gutsy even in its 0.3.3 version (currently in the archives). It worked like a charm in feisty with the same version.
Related branches
Changed in xournal: | |
assignee: | nobody → vincenzo-ml |
To post a comment you must log in.
The cause of this problem is that xournal uses pdftoppm, to convert individual pages
in the pdf file to bit maps. The old version of pdftoppm named the bit map files with
six-digit page numbers irrespective of the number of pages in the pdf document. The new version uses the number of digits needed for the largest page number, e.g. three if the number of pages is in the range 100 to 999 inclusive.
I replaced the lines
ppm_name = g_strdup_ printf( "%s/p-% 06d.ppm" , bgpdf.tmpdir, req->pageno); new_from_ file(ppm_ name, NULL);
...
pixbuf = gdk_pixbuf_
in xo-file.c, with a bit of logic to try different number of digits (from 1 to 4) and look for a non-null pixbuf. It works.