إعادة تسمية الحقل

إعادة تسمية حقل

  1. اربط ملف PDF المصدر إلى واجهة FormEditor.
  2. استدعِ renameField(...) مع اسم الحقل الحالي والاسم الجديد للحقل.
  3. احفظ المستند المحدث.
public static void renameField(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.renameField("City", "Town");
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}