Add Calculated form fields in PDF using Aspose.PDF for .NET

Is it possible to add calculated fields to an existing pdf form via Aspose.Pdf?

kindly,
linda

I am able to calculate fields using Javascript. However if I also extend the field on other pages using the AddFieldAppearance the action no longer works. Thank you for any feedback.


Hi Linda,


Thanks for using our API’s.

You may try using following code snippet to get/iterate through all fields in PDF document and using this approach, you can get form fields count. Get Values from all the Fields of PDF Document

You can also get the names of all fields in PDF document and get the count of form fields.

[C#]

//First a input pdf file should be assigned

Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(@"c:\pdftest\FilledForm.pdf");

//get all field names

String[] allfields = form.FieldNames;

Console.WriteLine(allfields.Length);

Is it possible to be triggered by the onLostFocus event of another field which was created using the AddFieldAppearance property? The form I’m trying to build includes a calculated field that gets re-figured when an existing form field changes. I get that js will not run on AddFieldAppearance fields.

Hi Linda,


Thanks for your feedback. As per my understanding you want to create a calculated filed using Aspose.Pdf. I am afraid currently Aspose.Pdf does not support to create calculated field in PDF form. We have already logged a feature request PDFNEWNET-38665 for same in our issue tracking system. We have linked your post to the issue id and will notify you as soon as it is implemented.

However if there is difference in you requirement then please share some more details.

We are sorry for the inconvenience.

Best Regards,