3

I want to sign a pdf with one signature with appearance on every page

Here is what I do:

Create the stamper

 PdfStamper st = PdfStamper.CreateSignature(reader, new FileStream(this.outputPDF, FileMode.Create, FileAccess.Write), '\0', null, true);

Get the signature appearance

PdfSignatureAppearance sap = st.SignatureAppearance;

populate the properties

 sap.SetCrypto(...);
 sap.Reason = SomeString;
 sap.Contact = SomeString;
 sap.Location = SomeString;

Each stamper has one appearance. I am able to set only signature appearance. Has anyone done something like that? Do I have to create a List of Stampers or a List of SignatureAppearances?

Svetlozar Angelov
  • 21,214
  • 6
  • 62
  • 67

2 Answers2

2

A single PdfSignatureAppearance is always associated with a single page and it's not possible to add more than one annotation to a signature object.

Pent Ploompuu
  • 5,364
  • 1
  • 27
  • 47
0

Actually this is possible but not recommended and forbidden starting with PDF 2.0. But there are examples in the wild describing it in more detail: Here, here and here.

Lonzak
  • 9,334
  • 5
  • 57
  • 88