Hi,
I need to create two dynamically signature field in a pdf document.
I found the code necessary to create and add a SigField into the forum.
I've no problem to create and add the first one, but when I try to create and add the second the program freeze in the Document.Form.Add command.
What's the problem?
Best regards
Giorgio Calchi Novati
1 Like
Hello Giorgio,
Thanks for using our products and sorry for replying you late.
I have tested the scenario using Aspose.Pdf for .NET 6.9.0 where I have tried adding two sample SignatureFields to an existing PDF document and I am unable to notice any problem. I have used the following code snippet to test the scenario. Can you please share the code snippet that you are using. We are sorry for your inconvenience.
[C#]
//open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(“D:\pdftest\BarCodeImage-PDF.pdf”);
// Sample Signature field
SignatureField signatureField1 = new SignatureField(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(200, 300, 500, 400));
// name for signature field
signatureField1.PartialName = “signature1”;
//add field to the document
pdfDocument.Form.Add(signatureField1, 1);
SignatureField signatureField2 = new SignatureField(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(300, 400, 600, 500));
signatureField2.PartialName = “signature2”;
//add field to the document
pdfDocument.Form.Add(signatureField2, 1);
//save modified PDF
pdfDocument.Save(“D:\pdftest\FormFields-output.pdf”);
Hello,
Thanks very much for your answer.
I made a mistake in creating signature fields. I forgot to set the PartialName.
After setting this property, the fields are entered correctly.
thanks again
Giorgio Calchi Novati