重命名字段
Contents
[
Hide
]
重命名字段
- 将源 PDF 绑定到
FormEditor对象。 - 调用
renameField(...)使用当前字段名称和新字段名称。 - 保存更新后的文档。
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();
}
}