Set Field Appearance
Contents
[
Hide
]
Set field appearance flags
- Bind the source PDF to the
FormEditorfacade. - Call
setFieldAppearance(...)for the target field and chosen annotation flag. - Save the updated document.
public static void setFieldAppearance(Path inputFile, Path outputFile) {
FormEditor editor = new FormEditor();
try {
editor.bindPdf(inputFile.toString());
editor.setFieldAppearance("First Name", AnnotationFlags.Hidden);
editor.save(outputFile.toString());
} finally {
editor.close();
}
}