Add List Item

Add an item to a list field

  1. Bind the source PDF to the FormEditor facade.
  2. Call addListItem(...) for the target field and new display/value pair.
  3. Save the updated document.
public static void addListItem(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.addListItem("Country", new String[] {"New Zealand", "New Zealand"});
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}