I want to apply Digital Signature to PDF with multiple pages in asp.net wit c#. I am using Itextsharp dll.
I tried using pdfsignature class and was able to set the digital sign, But I need to apply multiple signatures to the PDF. I am able to apply only to a single page even on clearing a new object for pdfsignature class.
What I have tried:
PdfSignatureAppearance sap = st.SignatureAppearance;
sap.SetCrypto(this.myCert.Akp, this.myCert.Chain, null, PdfSignatureAppearance.WINCER_SIGNED);
sap.Reason = SigReason;
sap.Contact = SigContact;
sap.Location = SigLocation;
string SourcePDFFullPath = @"F:\Test.pdf";
PdfReader pdfReader = new PdfReader(SourcePDFFullPath);
PdfSignatureAppearance sap1 = st.SignatureAppearance;
sap1.SetCrypto(this.myCert.Akp, this.myCert.Chain, null, PdfSignatureAppearance.WINCER_SIGNED);
sap1.Reason = SigReason;
sap1.Contact = SigContact;
sap1.Location = SigLocation;
string SourcePDFFullPath = @"F:\Test.pdf";
PdfReader pdfReader = new PdfReader(SourcePDFFullPath);
sap.SetVisibleSignature(new iTextSharp.text.Rectangle(100, 100, 250, 150), 1, null);
sap1.SetVisibleSignature(new iTextSharp.text.Rectangle(100, 100, 250, 150), 2, null);