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

Free Support Forum - aspose.com

XFA bug

My existing XFA PDF has field names like: Formular1[0].Page1[0].NameVorname[0]

When I run the following code…
com.aspose.pdf.facades.Form pdfform = new com.aspose.pdf.facades.Form(); pdfform.bindPdf("demo.pdf"); pdfform.fillField("Formular1[0].Page1[0].NameVorname[0]", "Peter Muster");
…it crashes with:
Exception in thread "main" java.lang.NullPointerException at com.aspose.pdf.l25if.l0if(Unknown Source) at com.aspose.pdf.l25if.lh(Unknown Source) at com.aspose.pdf.XFA.get_Item(Unknown Source) at com.aspose.pdf.Field.le(Unknown Source) at com.aspose.pdf.Field.setValue(Unknown Source) at com.aspose.pdf.TextBoxField.setValue(Unknown Source) at com.aspose.pdf.facades.AForm.fillField(Unknown Source) at com.aspose.pdf.facades.Form.fillField(Unknown Source) at ch.np.svc.tests.TestPdfFill.run(TestPdfFill.java:23) at ch.np.svc.tests.TestPdfFill.main(TestPdfFill.java:32)

I think this is a bug.
Can you confirm it? Thank you!

@info-86

Would you kindly share your sample PDF file with us. We will test the scenario in our environment and address it accordingly.