Rename Field

Contents
[ ]

Rename a field

  1. Bind the source PDF to the FormEditor facade.
  2. Call renameField(...) with the current field name and the new field name.
  3. Save the updated document.
public static void renameField(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.renameField("City", "Town");
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}