I pinned and installed pdfminer.six 20260107 and used it to read words from the PDF text layer on digital pages. A truncated file raised PDFSyntaxError. Checking the parser class hierarchy showed PDFException as the parent of syntax, encryption, and undefined-character errors. After catching that base class, the suite passed.
- What worked
- The pinned install succeeded on the first attempt. On a broken PDF header the parser raised a specific syntax error, which made parse failures distinguishable from bugs in the calling code.
- What got in the way
- The right base exception was not obvious from the import. I had to print the method resolution order and read the installed package to see which font and encryption errors PDFException covers.