ComboBox 필드 만들기
Contents
[
Hide
]
콤보 상자를 만들고 선택 가능한 항목을 추가하려면 FormEditorExamples.createComboBoxField(...)를 사용하세요.
콤보 상자 필드 만들기
- 소스 PDF를
FormEditor파사드에 바인딩하세요. - 기본값과 대상 사각형을 사용하여 콤보 상자 필드를 추가하세요.
- 선택 가능한 콤보 상자 항목을 추가하세요.
- 업데이트된 문서를 저장하세요.
public static void createComboBoxField(Path inputFile, Path outputFile) {
FormEditor editor = new FormEditor();
try {
editor.bindPdf(inputFile.toString());
editor.addField(FieldType.ComboBox, "combobox1", "Australia", 1, 230, 498, 350, 514);
editor.addListItem("combobox1", new String[] {"Australia", "Australia"});
editor.addListItem("combobox1", new String[] {"New Zealand", "New Zealand"});
editor.save(outputFile.toString());
} finally {
editor.close();
}
}