-
Hi, I have some PDF files in versions 1.1 and 1.4. The script that I wrote work perfectly in 1.4 files, but not in 1.1 versions. When I open 1.1 file in a PDF viewer (PDF XChange Viewer) and "Save As..." the new file is 1.4 version and works in the python script. Can anybody help me? Lib version: pdfplumber 0.5.28 Code:
Errors:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Judging by the stacktrace, the exception is raised from this library's main dependency, |
Beta Was this translation helpful? Give feedback.
Judging by the stacktrace, the exception is raised from this library's main dependency,
pdfminer.six
. And my hunch is that the exception is caused by malformed PDFs, rather than a bug inpdfminer.six
. If you haven't already, it's worth trying to repair your PDF using Ghostscript. To do so, rungs -o repaired.pdf -sDEVICE=pdfwrite original.pdf
, replacingoriginal.pdf
with your PDF's actual filename.