Closed yob closed 3 years ago
I've seen PDFs in the wild where leaving off the final byte allows the ruby zlib bindings to successfully inflate the stream.
The spec I've changed here is one example I've kept around for over 10 years, but another was shared to the pdf-reader mailing list today.
The only downside to this change is the MalformedPDFError exception that's raised no longer references the underlying zlib exception. I think that's acceptable in return for being able to parse more files though.
I've seen PDFs in the wild where leaving off the final byte allows the ruby zlib bindings to successfully inflate the stream.
The spec I've changed here is one example I've kept around for over 10 years, but another was shared to the pdf-reader mailing list today.
The only downside to this change is the MalformedPDFError exception that's raised no longer references the underlying zlib exception. I think that's acceptable in return for being able to parse more files though.