Delete List Item

Delete an item from a list field

  1. Bind the source PDF to the FormEditor facade.
  2. Call delListItem(...) for the target field and item to remove.
  3. Save the updated document.
public static void deleteListItem(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.delListItem("Country", "UK");
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}