yob / pdf-reader

The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.
MIT License
1.82k stars 271 forks source link

Need to allow for more trailing junk #382

Closed sebbASF closed 3 years ago

sebbASF commented 3 years ago

PDFs with /Creator (Canon iR-ADV C5735 PDF) have been seen with 4845 trailing NUL bytes.

sebbASF commented 3 years ago

Thanks!

I was taught to always use constants for numbers. Helps to document them, and easier to change if needed. Particularly important if there are several instances of the same value with different meanings. If you then find that one of them needs to change, every reference to the bare number needs to be reviewed.