0
votes

I have written an application to sign PDF documents and now I am able to sign any non-signed PDF document, and Adobe Reader shows the green checkmark. Moreover I can sign a file with multiple signatures and the results are ok.

But if I try to sign the document using Adobe Reader, when I sign it again, the result is that any signature prior to the last one does not get the green checkmark because Acrobat thinks that the document has changed. Then, if I sign the document again using Adobe Reader and my application, the next signatures get the green marks again. The problem appears with the first adobe signature, but I cannot get the reason.

Workflow:

  1. Signature 1 with Acrobat => ok
  2. Signature 2 with my app => the previous signatures are invalid, but this is ok
  3. Signature 3 with Acrobat => signature 1 is invalid, but 2 and 3 are ok
  4. Signature 4 with my app => signature 1 is invalid, but 2, 3 and 4 are ok

Could you please help me to identify and correct the problem?

Thank you in advance.

The files:

1

1 Answers

2
votes

You change the AcroForm dictionary DA default appearance entry.

In the document signed by Adobe the AcroForm dictionary looks like this:

<</DA(/Helv 0 Tf 0 g )/DR<</Encoding<</PDFDocEncoding 8 0 R>>/Font<</Helv 6 0 R/MyriadPro-Regular 27 0 R/ZaDb 7 0 R>>>>/Fields[26 0 R]/SigFlags 3>>

After you signed that document it becomes this:

<</DA(/Helv 0 Tf 0 g)/DR<</Encoding<</PDFDocEncoding 8 0 R>>/Font<</Helv 6 0 R/MyriadPro-Regular 27 0 R/ZaDb 7 0 R>>>>/Fields[26 0 R 35 0 R]/SigFlags 3>>

I.e. you removed the trailing space character in the DA entry.