CheckBox 필드 만들기

FormEditorExamples.createCheckBoxField(...)를 사용하여 PDF 양식에 확인란 필드를 추가합니다.

체크박스 필드 생성

  1. 소스 PDF를 FormEditor 파사드에 바인딩하세요.
  2. FieldType.CheckBox이 포함된 확인란 필드, 필드 이름, 캡션, 페이지 및 직사각형을 추가하세요.
  3. 업데이트된 문서를 저장하세요.
public static void createCheckBoxField(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.addField(FieldType.CheckBox, "checkbox1", "Check Box 1", 1, 240, 498, 256, 514);
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}