Hello Aspose Team,
I also tried to accomplish this task using PKCS1 and PKCS7 types - no luck, the output file contains all signatures but only last is valid - same problem as in this thread.
Hello Aspose Team,
Hi there,
I used sample code from this [Article](http://www.aspose.com/docs/display/pdfnet/Improved+and+Flexible+PDF+Signing+Mechanism)
, section with multiple signatures. And this [document](https://github.com/asposepdf/Aspose_Pdf_NET/blob/master/Examples/CSharp/AsposePDF/Security-Signatures/Data/DigitallySign.pdf)
//create FormEditor object
FormEditor editor = new FormEditor(“input.pdf”, “WithSignatureFields.pdf”);
//add signature fields
editor.AddField(FieldType.Signature, “Signature from Alice”, 1, 10, 10, 110, 110);
editor.AddField(FieldType.Signature, “Signature from John”, 1, 120, 150, 220, 250);
editor.AddField(FieldType.Signature, “Signature from Smith”, 1, 300, 200, 400, 300);
//save the form
editor.Save();
//add signature to any of the signature fields
PdfFileSignature pdfSign = new PdfFileSignature(“WithSignatureFields.pdf”, “SignedByJohn.pdf”);
pdfSign.Sign(“Signature from John”, “Signature Reason”, “John”, “Kharkov”, new Pkcs1Signature(“test.pfx”, “password”));
//each time new signature is added you must save the document
pdfSign.Save();
//add second signature
PdfFileSignature pdfSign2 = new PdfFileSignature(“SignedByJohn.pdf”,“SignedByJohnAndAlice.pdf”);
pdfSign2.Sign(“Signature from Alice”, “Signature Reason”, “Alice”, “Odessa”, new Pkcs7Signature(false, “test2.pfx”, “password”));
//each time new signature is added you must save the document
pdfSign2.Save();
Hi there,
//create FormEditor object<o:p></o:p>
FormEditor editor = new FormEditor();
editor.BindPdf(myDir+"Helloworld.pdf");
//add signature fields
editor.AddField(Aspose.Pdf.Facades.FieldType.Signature, "Signature from Alice", 1, 10, 10, 110, 110);
editor.AddField(Aspose.Pdf.Facades.FieldType.Signature, "Signature from John", 1, 120, 150, 220, 250);
editor.AddField(Aspose.Pdf.Facades.FieldType.Signature, "Signature from Smith", 1, 300, 200, 400, 300);
//save the form
editor.Save(myDir+"WithSignatureFields.pdf");
//add signature to any of the signature fields
PdfFileSignature pdfSign = new PdfFileSignature();
pdfSign.BindPdf(myDir+"WithSignatureFields.pdf");
pdfSign.Sign("Signature from John", "Signature Reason", "John", "Kharkov", new PKCS1(myDir+"temp.pfx", "password"));
//each time new signature is added you must save the document
pdfSign.Save(myDir+"SignedByJohn.pdf");
//add second signature
PdfFileSignature pdfSign2 = new PdfFileSignature();
pdfSign2.BindPdf(myDir+"SignedByJohn.pdf");
pdfSign2.Sign("Signature from Alice", "Signature Reason", "Alice", "Odessa", new PKCS7(myDir + "test.pfx", "password"));
//each time new signature is added you must save the document
pdfSign2.Save(myDir+"SignedByJohnAndAlice.pdf");
Hello Tilal,
Hi there,
Hi there,
Thanks for your inquiry. I have tested the scenario with a sample PFX certificate file using Aspose.Pdf for .NET 11.9.0 and unable to notice the reported issue. Your shared file shows warning message of signature validity instead some error. Please double check the validity of your signature and hopefully this thread of Adobe support forum will be helpful in the scenario.
https://helpx.adobe.com/acrobat/using/validating-digital-signatures.html
Please feel free to contact us for any further assistance.
Best Regards,
Hi there,
Hi there,
Hi Felaray,
Any news on this issue?
This really gets in a way of our company development plans, and this issue hangs open for quite some time already. Giving the fact that electronic signature importance in day-to-day businesses is increasing, this topic gets hotter every day
Signing multiple times PDF document that was
generated with Aspose tools invalidates every previous signature.
We create document of PDF/A type
Our
business process requires to send this document to multiple recipients
and each of them will have to sign same document. However when we try to
do this using Aspose.Pdf tools every previous signature is being
invalidated.
Here I am attaching our test project which includes:
- source code
- docx sample file, which we convert to PDF/A using Aspose.Pdf tools
- certificate file (pfx) which we use in our test to sign the document.
What we have tested is that signing PDF multiple times works using Aspose.Pdf tools, but PDF/A does not. And this is big problem, because of European Union ETSI conformance requirements. As signatures must conform to one of those http://signatures-conformance-checker.etsi.org/pub/index.shtml
Hi Darius,bss:
Any news on this issue?
This really gets in a way of our company development plans, and this issue hangs open for quite some time already. Giving the fact that electronic signature importance in day-to-day businesses is increasing, this topic gets hotter every day
Signing multiple times PDF document that was
generated with Aspose tools invalidates every previous signature.
We create document of PDF/A type
Our
business process requires to send this document to multiple recipients
and each of them will have to sign same document. However when we try to
do this using Aspose.Pdf tools every previous signature is being
invalidated.
Here I am attaching our test project which includes:
- source code
- docx sample file, which we convert to PDF/A using Aspose.Pdf tools
- certificate file (pfx) which we use in our test to sign the document.
What we have tested is that signing PDF multiple times works using Aspose.Pdf tools, but PDF/A does not. And this is big problem, because of European Union ETSI conformance requirements. As signatures must conform to one of those http://signatures-conformance-checker.etsi.org/pub/index.shtml
Hi Felaray,