Set Field Limit

Set a field character limit

  1. Bind the source PDF to the FormEditor facade.
  2. Call setFieldLimit(...) for the target field and maximum character count.
  3. Save the updated document.
public static void setFieldLimit(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.setFieldLimit("First Name", 15);
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}