Dear all, I have a problem when signing a PDF document twice, which already has signature form fields pre-placed on the document.
The problem is visible, when the document is signed the second time. The signatures are correct, but Acrobat says, that there was a change in the document structure before the second signature was created. Message is something like this: “Form Fields with Property Changes > Field Person_1 on page 5”. I know, that this doesn’t change the validity of the signature itself, but still it is not nice and people are insecure, what it exactly means. Looking into the COS structure of the PDF, I see that there are more objects written (in the incremental save), than actually changed. Two objects stand out: a) the AcroForm dictionary b) the Page dictionary Both objects are the exactly the same from the beginning, but still are written with every signature applied. I had a working workaround in the past, where I changed the AcroForm /Annots entry to a object reference. This worked some time ago, but not anymore. We currently use PDFBox 2.0.19, I updated to 2.0.22 with no success. Two questions: a) Why are the AcroForm and Pages objects marked as changed, when there are no changes? b) Can I somehow try to remove the “needToBeUpdated” flag, before a incremental save. I tried, but fail to find the right time to do so. c) When I mark the COSArray referenced by AcroForm /Annots to "direct=false”, it is ignored in the COSWriter. COSWriter#visitFromArray never checks, if the array is direct or not. But I am pretty sure, that this worked some time ago. Happy about any pointers, what I can try next to fix the problem. Kind regards, Waldemar
smime.p7s
Description: S/MIME cryptographic signature

