Reading Form Values
Contents
[
Hide
]
The Java FormExamples class demonstrates the main form-processing workflows exposed by the Facades API.
Get Field Values
Use FormExamples.inspectFormFields(...) to inspect field names and their current values.
public static void inspectFormFields(Path inputFile) {
Form form = new Form();
try {
form.bindPdf(inputFile.toString());
System.out.println("Field names: " + Arrays.toString(form.getFieldNames()));
for (String fieldName : form.getFieldNames()) {
System.out.println(fieldName + " = " + form.getField(fieldName));
}
} finally {
form.close();
}
}