Reputation: 21660
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?
Upvotes: 3
Views: 1119
Reputation: 9816
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.
Upvotes: 0
Reputation: 5414
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.
Upvotes: 2