maxpmaxp / pdfreader

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

Issue 41 max recursion depth #46

Closed maxpmaxp closed 4 years ago

maxpmaxp commented 4 years ago

Fixes #41 There were 2 reasons for infinite recursion:

  1. Empty name tokens led to ParserErrors in the 1st file
  2. A stream /Length in the second file is defined as a reference to indirect object following the stream. The reference is not listed on xref.

Solutions:

  1. Allow empty names
  2. Brute-force objects lookup improved