ListBox 필드 만들기
Contents
[
Hide
]
FormEditorExamples.createListBoxField(...)를 사용하여 미리 정의된 항목이 포함된 목록 상자를 만듭니다.
목록 상자 필드 만들기
- 소스 PDF를
FormEditor파사드에 바인딩하세요. setItems(...)를 사용 가능한 목록 항목을 정의하세요.- 기본값과 직사각형을 사용하여 목록 상자 필드를 추가하세요.
- 업데이트된 문서를 저장하세요.
public static void createListBoxField(Path inputFile, Path outputFile) {
FormEditor editor = new FormEditor();
try {
editor.bindPdf(inputFile.toString());
editor.setItems(new String[] {"Australia", "New Zealand", "Malaysia"});
editor.addField(FieldType.ListBox, "listbox1", "Australia", 1, 230, 398, 350, 514);
editor.save(outputFile.toString());
} finally {
editor.close();
}
}