Fill Check Box Fields
Contents
[
Hide
]
Use FormExamples.fillCheckBoxFields(...) to set check box values in a form.
public static void fillCheckBoxFields(Path inputFile, Path outputFile) {
Form form = new Form();
try {
form.bindPdf(inputFile.toString());
form.fillField("subscribe_newsletter", "Yes");
form.fillField("accept_terms", "Yes");
form.save(outputFile.toString());
} finally {
form.close();
}
}