maxpmaxp / pdfreader

Python API for PDF documents
MIT License
113 stars 26 forks source link

Generation Assertion in xref.py #83

Closed jholladay10 closed 2 years ago

jholladay10 commented 3 years ago

This assertion is raising an exception in xref.py:

assert isinstance(generation, int) and 0 <= generation <= MAX_GEN

MAX_GEN is 65535. I have a PDF file with a value of 65536. When I comment out this assertion, it works fine (I just need to pull the text). I searched for references to this field and didn't find any. I'd prefer to know what this means if possible and also to not have to fork the library if I can avoid it.

maxpmaxp commented 2 years ago

Fixed in #89. Thank you for the feedback!