Closed ardurin closed 2 months ago
Crate version: 0.34.0
When reading and saving a pdf with two xref tables, the tables are merged into one but /Prev is not removed from the trailer.
Use this code to replicate:
fn main() { let mut document = lopdf::Document::load("in.pdf").unwrap(); document.save("out.pdf").unwrap(); }
Use this as in.pdf
in.pdf
qpdf --check out.pdf and exiftool out.pdf report the resulting file as malformed.
qpdf --check out.pdf
exiftool out.pdf
Crate version: 0.34.0
When reading and saving a pdf with two xref tables, the tables are merged into one but /Prev is not removed from the trailer.
Use this code to replicate:
Use this as
in.pdf
qpdf --check out.pdf
andexiftool out.pdf
report the resulting file as malformed.