After merge cross reference table in not fully correct, that causes problem with PDF signing. All details, analysis and samples are here: http://stackoverflow.com/questions/30526254/sign-concatenated-pdf-in-append-mode-with-certified-no-changes-allowed
Created attachment 116275 [details] [review] Fix for xref table creation Suggested fix: here is the line "PDFDoc::writeXRefTableTrailer(trailerDict, yRef, gFalse /* do not write unnecessary entries */," in pdfunite.cc Change gFalse to gTrue fixes the problem.
Thomas?
(In reply to Albert Astals Cid from comment #2) > Thomas? The review for the patch is okay. But I must admit that I can't really follow the arguments in http://stackoverflow.com/questions/30526254/sign-concatenated-pdf-in-append-mode-with-certified-no-changes-allowed. Yes, according to section 7.5.4 Cross-Reference Table of ISO 32000-1 (http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf) 2g.pdf is a modified PDF document. But why not? I can argue that pdfunite modifies the orginal g.pdf in the way that it adds a second page, which is in this case the same g.pdf. Therefore in my eyes itext should completely rewrite the PDF document when using the parameter CERTIFIED_NO_CHANGES_ALLOWED!!! Or it should deny to use this option with any modified PDF. But nevertheless, we can also argue that pdfunite should write a complete unmodified PDF, and since the usage of the parameter "writeAllEntries" does exactly this and also produces a well formed, just unmodified, PDF I can live with this change.
Actaully vovodroid i'll need your name so i can include it in the changelog.
First name is Vlad, but I would prefer not disclose my surname.
By a way - not related to this bug, but what is with https://bugs.freedesktop.org/show_bug.cgi?id=90066 ?
We really need the full name
I really don't want to get it )
to give
That's sad :/ We'll have to find someone else to propose the patch.
OK, I'm Arthur Stavisky, please push this patch to git. Thanks.
Pushed!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.