The file https://punpun.xyz/Xl6N.pdf displays fine with Poppler 0.24.5 (from Mint stable / Ubuntu oldstable), but fails to load in the latest version. This issue was originally reported here: https://github.com/phillipberndt/pqiv/issues/67
I tried it with 0.42.0 and with actual master (0.45.0), but I didn't get any problems, neither with okular nor with evince nor with any commandline tools: thomas@w7-thomas:~/xpdfmerge/thread/poppler$ ./glib/demo/poppler-glib-demo bugzilla/96884.open/Xl6N.pdf Document successfully loaded in 0,5080 seconds thomas@w7-thomas:~/xpdfmerge/thread/poppler$ ./utils/pdftocairo -png -cropbox bugzilla/96884.open/Xl6N.pdf output/Xl6N thomas@w7-thomas:~/xpdfmerge/thread/poppler$ ./utils/pdftoppm -png -cropbox bugzilla/96884.open/Xl6N.pdf output/Xl6N
Indeed, the demo works here as well. I dug a bit deeper into this and found that the error is in the poppler_document_new_from_stream() call of the glib interface. Files opened via poppler_document_new_from_file() and poppler_document_new_from_data(), respectively, work fine. This fails: -----8<---------------------------- // gcc -o test test.c `pkg-config --libs --cflags glib-2.0 poppler-glib` // to compile #include <stdio.h> #include <glib.h> #include <poppler.h> int main(int argc, char *argv[]) { GError *error_pointer = NULL; GFile *file = g_file_new_for_path(argv[1]); GFileInputStream *stream = g_file_read(file, NULL, &error_pointer); PopplerDocument *doc = poppler_document_new_from_stream(G_INPUT_STREAM(stream), -1, NULL, NULL, &error_pointer); if(error_pointer) { printf("Error: %s\n", error_pointer->message); } } ----->8----------------------------
Ps. This also means that this is not a regression. In 0.24.5, poppler_document_new_from_stream() has actually been completely unusable due to bug #82630, and I had a workaround in place that does not use the API if the poppler version is too old. Sorry for the misinformation.
Created attachment 127373 [details] Failing file Here is another file, this time created by LaTeX and thus probably simpler in its structure, that fails to load with the stream loader.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/488.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.