//get FormRenderer and Data objects
AcroRenderer renderer = decode_pdf.getFormRenderer();
if(renderer==null)
return scroll;
GUIData formData=renderer.getCompData();
/**
* populate our list with details
*/
for (Object aFormsOnPage : formsOnPage) {
// get name of form
String formName = (String) aFormsOnPage;
//swing component we map data into
Component[] comp = (Component[]) formRenderer.getComponentsByName(formName);
if (comp != null) {
//number of components - may be several child items
//int count = comp.length;
//take value or first if array to check for types (will be same if children)
FormObject formObj = null;
//extract list of actual PDF references to display and get FormObject
String PDFrefs = "PDF ref=";
JLabel ref = new JLabel();
//actual data read from PDF
Object[] rawFormData = formData.getRawForm(formName);
int objCount = rawFormData.length;
for (Object aRawFormData : rawFormData) {
formObj = (FormObject) aRawFormData;
PDFrefs = PDFrefs + ' ' + formObj.getObjectRefAsString();
}