We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ASPOSE.PDF C# Extract XFA Data

I have a completed PDF XFA form that I need to mine the field values input by the user. Is this possible with ASPOSE.PDF C#?

Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form();

foreach (string nm in form.FieldNames)
Console.WriteLine(“Field Name{0}\t\tValue: {1}”, nm, form.GetField(nm));

All the data is empty when i try to read the values. I retrieve no data and eventually get an exception: System.NullReferenceException: ‘Object reference not set to an instance of an object.’.

Even if i point specifically at a field name I know has data, I get nothing in return.

I just need to retrieve all the input data by the form user.



Would you please share the sample PDF document for our reference? We will test the scenario in our environment and address it accordingly.