Skip to content

Commit 285df1b

Browse files
authored
Merge pull request #1277 from nexB/806-new-pdfminer.six
Use new official release of pdfminer.six #806
2 parents b9764e7 + 1cd71b2 commit 285df1b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/typecode/contenttype.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from pdfminer.pdfparser import PDFParser
3737
from pdfminer.pdfdocument import PDFDocument
3838
from pdfminer.pdfparser import PDFSyntaxError
39+
from pdfminer.psparser import PSSyntaxError
3940
from pdfminer.pdfdocument import PDFEncryptionError
4041
from pdfminer.pdftypes import PDFException
4142

@@ -489,7 +490,7 @@ def is_pdf_with_text(self):
489490
with contextlib.closing(PDFParser(pf)) as parser:
490491
doc = PDFDocument(parser)
491492
self._is_pdf_with_text = doc.is_extractable
492-
except (PDFSyntaxError, PDFException, PDFEncryptionError):
493+
except (PDFSyntaxError, PSSyntaxError, PDFException, PDFEncryptionError):
493494
self._is_pdf_with_text = False
494495
return self._is_pdf_with_text
495496

0 commit comments

Comments
 (0)