Concatenate Dynamic XFA PDFs to one single document using Aspose.PDF for Java

Aspose Team,


I’ve been trying to concatenate Dynamic XFA PDfs to one single PDF using evaluation version.
Our goal is to import XML data to PDFs, then concatenate all files into one single PDF.

I’ve tried 2 different options using Aspose PDF java version.

1. Convert XFA pdf with data to standard PDF
Result : data entered in all fields are cleared using below code.
Document document = new Document(dataDir+“RR_SF424_2_0_V2_0_48742.pdf”);
//Set the form fields type as standard AcroForm
document.getForm().setType(FormType.Standard);
document.getForm().flatten();
//Save the resultant PDF
document.save(dataDir+“Standard_AcroForm.pdf”);

2. Open PDF, flatten all fields and save Pdf with a different filename. (import xml and flatten all fields also works same way)
Result : Some fields like checkbox, selection lists are still editable. and some data is not retained using below code.
com.aspose.pdf.facades.Form form1 = new com.aspose.pdf.facades. Form();
form1.bindPdf(dataDir + “RR_SF424_2_0_V2_0_48742.pdf”);
form1.flattenAllFields();
form1.save(dataDir + “RR_SF424_2_0_V2_0_48742_data_flatten.pdf”);

//different PDF Test (first few fields are not retained with data )
com.aspose.pdf.facades.Form pdfForm = new com.aspose.pdf.facades.Form();
pdfForm.bindPdf(dataDir + “BSRI_RR_Budgetv.pdf”);
pdfForm.flattenAllFields();
pdfForm.save(dataDir + “BSRI_RR_Budgetv_flatten.pdf”);

Please suggest the right way of converting and concatenation process.

Hi Geetha,


Thanks for contacting support.

I have tested the scenario of converting XFA form (RR_SF424_2_0_V2_0_48742.pdf) to Standard AcroForm and as per my observations, the data is not being preserved in resultant document. For the sake of correction, I have logged this problem
as PDFNEWJAVA-35331 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.

Aspose Team,

Any update on this issue.

Thanks,
Geetha.

Hi Geetha,


Thanks for your patience.

As we recently have been able to notice this issue, so its still pending for review and I am afraid the issue is not yet resolved. Please note that the issues are resolved on first come first serve basis as we believe its the fairest policy to all the customers.

Aspose Team,



Any update on this issue.

Thanks,
Geetha.

Hi Geetha,


Thanks for your inquiry. I am afraid your above reported issue is still pending for analysis as currently our product team is busy in resolving other issues in the queue, reported earlier. We will notify you as soon as we made some significant progress towards issue resolution.

We are sorry for the inconvenience caused.

Best Regards,

Aspose Team,

Thank you for looking into this issue.
We understand that team is working on pending issues in the queue.
What would it take to expedite this issue?
How soon it would be resolved if we paid for the expedited service?

Thanks,
Geetha

Hi Geetha,


Thanks for your patience.

We do offer Enterprise Support and Priority Support besides free technical support. However please note that ES/PS support only expedites the issue investigation but we do not guarantee any immediate resolution for problems under this support model because the resolution might be dependent upon other open issue or any missing feature. For further information, please visit Support Options.

Hi,

iMedrist purchased Priority Support and would like to escalate this issue using that Priority Support. Please let us know if there is any update on this issue.

Thank you.

Hi Geetha,


Thanks for purchasing priority support. As requested, we have raised your issue priority to “Priority support”. Now our product team will plan its resolution as per new priority and you can access related priority support thread using your priority support user for further details.

Please feel free to contact us for any further assistance.

Best Regards,

The issues you have found earlier (filed as PDFJAVA-35331) have been fixed in Aspose.Pdf for Java 17.3.0 Release Notes.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hello Aspose team,

I am using aspose-words-19.10-jdk17 but I don’t seem to get the expected results when saving my XFA’s as standard forms. Here is what I am doing:

com.aspose.pdf.Document document = new com.aspose.pdf.Document(grantFormPath);
document.getForm().setType(FormType.Standard);
document.save(grantFormPath.replace(".pdf", “_STD.pdf”));
document.close();
document.dispose();

When I used the same file as the original post (RR_SF424_2_0_V2_0_39837.pdf) I get an empty standard file. I also tried with a different file and that worked but the hidden elements are now visible and stay on top of the fields.

Any suggestions are greatly appreciated.

@mescobar

Would you kindly share your sample PDF document with us, so that we can test the scenario in our environment and address it accordingly.

Sure, here are the documents I used, the ones that end in _STD are the resulting files.

Thank you!

Summary

RR_OtherProjectInfo_1_3_V1_3_39839.pdf (2.1 MB)
RR_OtherProjectInfo_1_3_V1_3_39839_STD.pdf (2.5 MB)
RR_SF424_2_0_V2_0_39837.pdf (311.3 KB)
RR_SF424_2_0_V2_0_39837_STD.pdf (217.1 KB)

@mescobar

We are testing it and will get back to you shortly.

@mescobar

We were able to replicate the issues in our environment and have logged them as following in our issue tracking system.

  • PDFJAVA-38993
  • PDFJAVA-38994

We will definitely look into details of these issues and keep you posted with the status of their correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Thanks for the reply, In the past iMedRIS purchased Priority Support to expedite this issue, is that something that would be necessary to do again?

@mescobar

In case you already have paid support subscription and these logged issues are blocker for you, you can please escalate their priority by posting in paid support forum.