//create an instance of FormEditor class and bind input and output pdf files
var editor = new Aspose.Pdf.Kit.FormEditor("c:\\input.pdf", "c:\\output.pdf");
//create AcroForm fields - I have created only two fields for simplicity
editor.AddField(Aspose.Pdf.Kit.FieldType.Text, "firstname", 1, 100, 600, 200, 625);
editor.AddField(Aspose.Pdf.Kit.FieldType.Text, "lastname", 1, 100, 550, 200, 575);
//add a submit button and set target URL
editor.AddSubmitBtn("submitbutton", 1, "Submit", "http://localhost:45358/TermsPrivacy.aspx", 100, 450, 150,475);
//save output pdf file
editor.Save();
I have used the above code to create a form in an existing PDF, but I dont see the text fields in the output PDF. I have attached both input and output pdf files.
Thanks
-Balaji