When I try to convert a pdf containing XFA form I get a NullReferenceException
Document document = new Document("form.pdf");
document.Form.Type = FormType.Standard;
document.Save("Flattened.pdf");
I am using a version without license since I am evaluating if it fits my needs…
Stacktrace:
- Test Name: FillXfaFormUsingAspose
- Test FullName: TestDataAccessLayer.AsposeXfaTest.FillXfaFormUsingAspose
- Test Source: d:\Source\Repos\nemesis\print\TestDataAccessLayer\AsposeXfaTest.cs: line 17
- Test Outcome: Failed
- Test Duration: 0:00:02,9403453
Result Message:
Test method TestDataAccessLayer.AsposeXfaTest.FillXfaFormUsingAspose threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.
Result StackTrace:
at at Aspose.Pdf.InteractiveFeatures.Forms.Form.*UnknownMethodName*(String, String, String) at Aspose.Pdf.InteractiveFeatures.Forms.Form.set_Type(FormType value) at TestDataAccessLayer.AsposeXfaTest.FillXfaFormUsingAspose() in d:\Source\Repos\nemesis\print\TestDataAccessLayer\AsposeXfaTest.cs:line 42