قائمة الطوابع

سرد الطوابع على صفحة

  1. اربط ملف PDF المصدر بـ PdfContentEditor الواجهة.
  2. استدعِ getStamps(pageNumber) لاسترجاع الطوابع على الصفحة المستهدفة.
  3. افحص الناتج مجموعة StampInfo[].
public static void listStamps(Path inputFile) {
    PdfContentEditor editor = new PdfContentEditor();
    try {
        editor.bindPdf(inputFile.toString());
        StampInfo[] stamps = editor.getStamps(1);
        System.out.println("Stamps on page 1: " + stamps.length);
    } finally {
        editor.close();
    }
}