XFA forms in PDF are not opening up after conversion

Hi,
I am using the below code to convert the XFA form to a regular PDF. But the resultant PDF is empty.
I have attached the XFA form.
I am using aspose-pdf-22.9-jdk16 for JAVA

// Load dynamic XFA form
Document document = new Document("XFAform.pdf");
// Set the form fields type as standard AcroForm
document.getForm().setType(FormType.Standard);
// Save the resultant PDF
document.save("C:/temp/<a class="attachment" href="/uploads/default/73788">Purchase_Order.pdf</a> (142.9 KB)
 Standard_AcroForm.pdf");

@sushma1509,

Could you please attach the PDF to we can try to replicate the issue?

Hi,
PFA the sample form

Purchase_Order.pdf (142.9 KB)

@sushma1509,

Are you sure you attached the right document?

Can you use the latest aspose version, currently it is the 23.1.

I executed the following code and nothing was lost. But the PDF didnt have form objects. So I am guessing you attached the wrong PDF.

public void MainCode()
{
    PartialPath = $@"{prefixPath}\Conversions\XfaConversionSample"; // Location of your input/output files

    LoadLicence(); // Load your License

    var doc = DocumentGet(); // Read your document

    Logic(doc);

    doc.Save($"{PartialPath}_output.pdf");
}

private void Logic(Document doc)
{
    // Set the form fields type as standard AcroForm
    doc.Form.Type = FormType.Standard;
}

Hi,
I did attach the correct document, but it seems to be incomplete. Can you please download from this URL ?

@sushma1509,

I had the same result. Still using version 23.1.

XfaConversionSample2_input.pdf (30.9 KB)
XfaConversionSample2_output.pdf (29.4 KB)

Hi @carlos.molina

Yes I see it working with the version you have mentioned.
Thanks

Hi @carlos.molina,
I just tried with a different document and the output is having issues.
Can you please take a look ?
I have attached both input and output filesPurchase_Order.pdf (142.9 KB)
output.pdf (180.8 KB)

@sushma1509,

Can you please verify your attachments? You can drag and drop pdf files. But you seem to upload the wrong ones once again.

Hi @carlos.molina
I am not sure what am I missing here. I am uploading it using the Upload button.
Now I have dragged and dropped. Also, please note that Purchase_Order will open only in FireFox , not in chrome

output.pdf (180.8 KB)
Purchase_Order.pdf (142.9 KB)

@sushma1509,

I was finally able to replicate the problem, I will be creating a ticket with the dev team.

@sushma1509
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-53647

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thanks for all the help @carlos.molina