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

Free Support Forum - aspose.com

Form.importXml broken in 21 (worked correctly in version 19.2)

Hello support,

since upgrading the Java version of Aspose-Pdf from 19.2 to 21.5 (and today while testing this bug also to the latest 21.10!) we experience a bug with the importForm functionality of the facades.Form class.

Example source code:

// Aspose initialization...

InputStream pdfFormInputStream = getClass().getResourceAsStream("AIA_14_201802_20201130.pdf");
InputStream xmlInputStream = getClass().getResourceAsStream("Filled_SB14_data.xml");
FileOutputStream outputStream = new FileOutputStream("Result_SB14.pdf");

Document document = new Document(pdfFormInputStream);
Form form = new Form(document);

Always the first form element of some specific kind (couldn’t figure out the pattern) is not correctly filled!
So while the XML data is available for e.g. address1 or postcode of every element, it stays empty for the first set (the person “Acker, Tami”).
It is correctly filled for “Dankenschweil, Beverly” and “Barth, Jost”. (We tested switching the data round - it will always fail for the first set.)

As we use this functionality since years for vital business functionality of our customers, a quick fix (or advice, how to adopt the PDF or XML to prevent the issue) would be really important and extremely helpful for us!

Thanks a lot,

The ZIP with the two inputs (pdf template and xml):
Form.importXML.bug.zip (1.2 MB)

The screenshot of the broken result, marking all the fields where data is not correctly imported (mind that some fields like the name are correctly filled!):
Form.importXml.result.png (51.8 KB)


A ticket with ID PDFJAVA-40990 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thank you @mudassir.fayyaz,

so I suppose there is no work around that you can offer right now?

Kind regards,


Yes, we will be able to suggest any workaround after investigating this issue.

Hello @mudassir.fayyaz,

do you have any news about PDFJAVA-40990? Is it already scheduled?
We are stuck with this business case because we don’t see any work around… :frowning:

Kind regards,


Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

Hello again, @mudassir.fayyaz,

any news on this issue? This is really causing issues for an important business case of us.
It’s getting management attention in our company. :frowning:

Thanks for any further progress,


We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

You reported this issue in free support forum and it will be treated with normal priority. To speed up the progress of issue’s resolution, we suggest you please check our paid support policies from following link.
Paid Support Policies


good news: our company now purchased paid support!
It should be connected to my account (I am a sub account though).

Can you please check that - and tell me how that now influences fixing this issue?
We sincerely hope this helps a lot in getting a timely solution!

Thanks a lot,


We have changed the priority of your issue from normal to priority support. You will be updated via paid support forum about this issue.

The issues you have found earlier (filed as PDFJAVA-40990) have been fixed in Aspose.PDF for Java 22.4.