Renommer le champ

Renommer un champ

  1. Liez le PDF source à la façade FormEditor.

  2. Appelez renameField(...) avec le nom du champ actuel et le nouveau nom du champ.

  3. Enregistrez le document mis à jour.

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();
    }
}