إنشاء حقل CheckBox
Contents
[
Hide
]
استخدام FormEditorExamples.createCheckBoxField(...) لإضافة حقل خانة اختيار إلى نموذج PDF.
إنشاء حقل مربع اختيار
- اربط ملف PDF المصدر إلى واجهة
FormEditor. - أضف حقل مربع الاختيار مع
FieldType.CheckBox، اسم الحقل، التسمية، الصفحة، والمستطيل. - احفظ المستند المُحدَّث.
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();
}
}