スタンプの一覧表示

ページ上のスタンプの一覧表示

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