lopdf
lopdf copied to clipboard
Hopefully the last panic
This document https://www.uspsoig.gov/sites/default/files/document-library-files/2016/RARC-WP-16-001.pdf
gives:
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: Custom { kind: InvalidInput, error: StringError("corrupt deflate stream") }', libcore/result.rs:945:5
The data of 5093 0 object is actually not a valid zlib stream, so can not be decompressed.
I understand. However, as PDF viewers are happy when loading the document what should be the solution.
Perhaps lopdf should have a 'relaxed' option where such oddities are handled gracefully (i.e no panic, only a warning or so). Not sure.
This file is encrypted, so decryption is needed before decompress.
Do you plan to implement it?
Yes, but not high priority, maybe in 2019.