We are interesting to use Aspose.Pdf for .NET product. We have already downloaded trial version of same product and go through the product features.
We need a following things in sample web application.
1) Generate a PDF document from xml file using Aspose.Pdf.
2) There should be two FormField in generated PDF document like FirstName & ListName.
3) There should be a SubmitButton in PDF document to validate FirstName & LastName mandatory field and then post data to web-service.
We are implementing Aspose.pdf in sample web application and facing some issues. The sample web application generates a PDF file, then Open pdf document in Adobe , filling firstname & lastname detail and
click on submit button, When we click on submit botton, There is a validated
mandatory field value but same button click doesn’t post FormField data to
web-service if all fields are validated.
I have also mention code.
formEditor.AddSubmitBtn(“submitbutton”, 1, “Submit”, “http://localhost/PDFGeneration/PostData.asmx/SubmitData”, 100, 450, 150, 475);
formEditor.SetFieldScript(“submitbutton”, “var field = this.getField(‘FirstName’); if(field.value == ‘’) app.alert(‘Enter First Name’);if(this.getField(‘LastName’).value == ‘’) app.alert(‘Eneter Last Name’);”);
I have also verified that, there is a working fine either Validation or Webservice call but There is not working both validation and web-service call on same submit button.
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34701. We
will investigate this issue in details and will keep you updated on the status
of a correction.
apologize for your inconvenience.
Hi Nayyer Shahbaz,
ButtonField btn = new ButtonField(doc.Pages, new Rectangle(100, 450, 150, 475));
btn.Value = "Submit";
btn.PartialName = "submitbutton";
//create submit form action
string url = "http://localhost/PDFGeneration/PostData.asmx/SubmitData";
SubmitFormAction action = new SubmitFormAction();
FileSpecification urlSpec = new FileSpecification();
urlSpec.Name = url;
urlSpec.FileSystem = PdfConsts.URL;
action.Url = urlSpec;
action.Flags = SubmitFormAction.ExportFormat;
string script = "var field = this.getField('textfield'); if(field.value == '') app.alert('Enter First Name');";
//set OnActivate action to button
btn.OnActivated = action;
FormEditor formEditor = new FormEditor(
formEditor.AddSubmitBtn("submitbutton", 1, "Submit", "http://localhost/PDFGeneration/PostData.asmx/SubmitData", 100, 450, 150, 475);
formEditor.AddFieldScript("submitbutton", "var field = this.getField('textfield'); if(field.value == '') app.alert('Enter First Name');");
The issues you have found earlier (filed as PDFNEWNET-34701) have been fixed in Aspose.Pdf for .NET 7.7.0.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.