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

Free Support Forum - aspose.com

Converting Dynamic XFA for to standard throws Exception

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 licence since I am evaluating if it fits my need…

stacktrace:

<span lang=“EN-US” style=“font-size:11.0pt;font-family:“Calibri”,sans-serif;
color:#1F497D;mso-ansi-language:EN-US”>Test
Name: FillXfaFormUsingAspose<o:p></o:p>

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


ž.


.‰ž[1](


ž , ƒ[1] , ˆ[1] )

at


ž.


ž.Convert(Dictionary`2 , €‰ž[1] )

at Aspose.Pdf.InteractiveFeatures.Forms.Form.•Ÿ(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

Hi Jelle,


Thanks for your inquiry. We will appreciate it if you please share your sample document here, we will look into it and guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

As requested the document in attachment

Hi Jelle,

Thanks for sharing source document. I have tested the XFA to Standard conversion and noticed the reported exception. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-39604 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

Best Regards,

any updates on this issue?

Hi Jelle,


Thanks for your patience.

As we recently have been able to notice this issue, so its still pending for review. However the team will start investigating the issue as per their schedule and as soon as we have some definite updates regarding its resolution, we will let you know.