I'm not so familiar with using debian packages, but here is the code in xournal-0.4/src/xo-file.c after my changes:
ppm_name = g_strdup_printf("%s/p-%04d.ppm", bgpdf.tmpdir, req->pageno); // printf("Child %d finished, should look for %s... \n", pid, ppm_name);
if (bgpdf.status == STATUS_ABORTED || bgpdf.status == STATUS_SHUTDOWN) pixbuf = NULL; else { pixbuf = gdk_pixbuf_new_from_file(ppm_name, NULL); if(pixbuf == NULL) { ppm_name = g_strdup_printf("%s/p-%03d.ppm", bgpdf.tmpdir, req->pageno); pixbuf = gdk_pixbuf_new_from_file(ppm_name, NULL); } if(pixbuf == NULL) { ppm_name = g_strdup_printf("%s/p-%02d.ppm", bgpdf.tmpdir, req->pageno); pixbuf = gdk_pixbuf_new_from_file(ppm_name, NULL); } if(pixbuf == NULL) { ppm_name = g_strdup_printf("%s/p-%01d.ppm", bgpdf.tmpdir, req->pageno); pixbuf = gdk_pixbuf_new_from_file(ppm_name, NULL); } }
It's pretty clumsy, and assumes no more than 9999 pages.
I'm not so familiar with using debian packages, but here is the code in xournal- 0.4/src/ xo-file. c after my changes:
ppm_name = g_strdup_ printf( "%s/p-% 04d.ppm" , bgpdf.tmpdir, req->pageno);
// printf("Child %d finished, should look for %s... \n", pid, ppm_name);
if (bgpdf.status == STATUS_ABORTED || bgpdf.status == STATUS_SHUTDOWN) new_from_ file(ppm_ name, NULL); printf( "%s/p-% 03d.ppm" , bgpdf.tmpdir, req->pageno); new_from_ file(ppm_ name, NULL); printf( "%s/p-% 02d.ppm" , bgpdf.tmpdir, req->pageno); new_from_ file(ppm_ name, NULL); printf( "%s/p-% 01d.ppm" , bgpdf.tmpdir, req->pageno); new_from_ file(ppm_ name, NULL);
pixbuf = NULL;
else {
pixbuf = gdk_pixbuf_
if(pixbuf == NULL) {
ppm_name = g_strdup_
pixbuf = gdk_pixbuf_
}
if(pixbuf == NULL) {
ppm_name = g_strdup_
pixbuf = gdk_pixbuf_
}
if(pixbuf == NULL) {
ppm_name = g_strdup_
pixbuf = gdk_pixbuf_
}
}
It's pretty clumsy, and assumes no more than 9999 pages.