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

Free Support Forum - aspose.com

XFA form fields extraction- java

Hi ,


I am using trail version of Aspose.pdf product with temporary license…I wanted to develope a sample program to extract XFA form fields , but facing strange issue with library where as it show me weird class names,method names and return type while developing the code…

Not sure what is causing the problem…Pls find the issue in attached screenshot

Hi Bharathi,


Thanks for contacting support.

Please try using following code snippet to get form field names and their respective values.

[Java]

//Open document<o:p></o:p>

Document pdf = new Document("c:/pdftest/RadioButtons.pdf");

Field[] fields = pdf.getForm().getFields();

for (int i = 0; i < fields.length; i++) {

System.out.println("Form field: " + fields[i].getFullName());

System.out.println("Form field: " + fields[i].getValue());

}


However I have also managed to notice the problem related to invalid/improper field names when using above stated code snippet. It appears that internal methods are being exposed but since the API is obfuscated, so they have unconventional names. For
the sake of correction, I have logged it in our issue tracking system as PDFNEWJAVA-35052. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We apologize for your inconvenience.