poppler/XRef.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit b312210b630f96baeb8b2f3b49b0b79779609d98 Author: Albert Astals Cid <[email protected]> Date: Sat Apr 6 23:18:18 2013 +0200 Fix for complete rewrites in repaired files Part 2 of bug #62985 if You save a PDF with defect xref offsets, the readXRefUntil(-1 /* read all xref sections */, &xrefStreamObjNums) in XRef::scanSpecialFlags() will destroy the already reconstructed entries table, but this means that any modification which the user did in the meantime get lost. This can be tested i.e. with bug168518.pdf. diff --git a/poppler/XRef.cc b/poppler/XRef.cc index 81e939a..0e76993 100644 --- a/poppler/XRef.cc +++ b/poppler/XRef.cc @@ -1556,7 +1556,9 @@ void XRef::scanSpecialFlags() { prevXRefOffset = mainXRefOffset; std::vector<int> xrefStreamObjNums; - readXRefUntil(-1 /* read all xref sections */, &xrefStreamObjNums); + if (!streamEndsLen) { // don't do it for already reconstructed xref + readXRefUntil(-1 /* read all xref sections */, &xrefStreamObjNums); + } // Mark object streams as DontRewrite, because we write each object // individually in full rewrite mode. _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
