إضافة عنصر إلى القائمة

إضافة عنصر إلى حقل القائمة

  1. اربط ملف PDF المصدر بـ واجهة FormEditor.
  2. استدعِ addListItem(...) للحقل المستهدف وزوج العرض/القيمة الجديد.
  3. احفظ المستند المحدث.
public static void addListItem(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.addListItem("Country", new String[] {"New Zealand", "New Zealand"});
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}