Is there a way to
retrieve all the form field names from a PDF file? I have to retrieve an unknown
number of form fields from a PDF template and fill in the matching fields
with data from an XML file.
I tried
using...
// Reads in the pdf
Template
PdfReader reader = new PdfReader(templatePath +
template);
PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream(path+outfile));
AcroFields form =
stamp.getAcroFields();
Collection fieldlist =
form.getFields().values();
for (Iterator i =
fieldlist.iterator(); i.hasNext(); ) {
System.out.println(i.next().toString());
}
And I get
...
Thanks for any
help...
Jim
Sloey