Comment 1 for bug 137944

Revision history for this message
khul (klas-hultqvist) wrote :

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);
  ...
  pixbuf = gdk_pixbuf_new_from_file(ppm_name, NULL);

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.