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

Free Support Forum - aspose.com

Geting subfields of class com.aspose.pdf.CheckboxField JAVA

I am using aspose pdf and in my case I have a Field variable of type class com.aspose.pdf.CheckboxField that I get from a pdf template. The problem is that this field contains several checkboxes(like subfields). How do I get them in java array or arraylist, beacuse right now I can only get the parent field, but not the options inside?
Thanks in advance.


You may please try getting the subfield as below:

Document doc = new Document(dataDir + "Report.pdf");

CheckboxField radio = (CheckboxField)doc.getForm().get_Item(1);
for (WidgetAnnotation subfield : radio)
 // do some stuff