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();
}
}