Closed orbanbalage closed 2 years ago
Can you provide a sample PDF to reproduce the issue? This seems like a poppler/ghostscript issue and not a pdf2image one. Unfortunately I can't really fix bugs in poppler as I have no visibility on the library.
Sorry, I thought I attached the file.
Indeed gs
found some issues with the file, but even after fixing it the issue remains.
gs -dNOPAUSE -dBATCH -sDEVICE=nullpage output.pdf -sOutputFile=output-fix.pdf
GPL Ghostscript 9.54.0 (2021-03-30)
Copyright (C) 2021 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
**** Warning: File has an invalid xref entry: 2. Rebuilding xref table.
Processing pages 1 through 2.
(...)
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> itext-paulo-155 (itextpdf.sf.net - lowagie.com) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
Command to fix the file:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output-fix.pdf output.pdf
Verify:
gs -dNOPAUSE -dBATCH -sDEVICE=nullpage output-fix.pdf
GPL Ghostscript 9.54.0 (2021-03-30)
Copyright (C) 2021 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 2.
Page 1
Page 2
I wanted to check out the file with poppler, but I don't remember how I installed pdf2image, and there were some conflicts in brew, so I ended up uninstalling it, and just installing xpdf, and using:
pdfimages output.pdf output-images
which works.
Perhaps there are no images in the file at all and that is the problem? Xpdf does make images out of the pages, which is what I wanted I think.
Here is the file if you wanted to check on your end.
Describe the bug pdf2image errors out instead of completing process (some PDFs work, some don't)
Desktop (please complete the following information):