Skip to main content
Interwork Corporation
IDR Solutions Product Support Portal
PDF開発用語集 モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動

PDPageFitBoundingBoxDestination

PDPageFitBoundingBoxDestinationは、Apache PDFBox Javaライブラリにおけるクラスであり、PDF文書内の特定のデスティネーションタイプを表します。

キーワード: pdpagefitboundingboxdestination, PDPageFitBoundingBoxDestination

概要

PDPageFitBoundingBoxDestinationは、Apache PDFBox Javaライブラリにおけるクラスであり、PDF文書内の特定のデスティネーションタイプを表します。このデスティネーションタイプは、 ( Citation: N.A., (N.A.). (). Document management — Portable document format — Part 2: PDF 2.0 International Organization for Standardization Retrieved from https://www.iso.org/standard/75839.html ) で定義されているように、PDFビューアに対してページの可視コンテンツのバウンディングボックスに合わせて表示するよう指示します。これは、ブックマーク、リンク、目次エントリなど、正確なビューポート制御が必要なインタラクティブナビゲーション要素を作成する際に一般的に使用されます。

定義

PDPageFitBoundingBoxDestinationは、 ( Citation: N.A., (N.A.). (). Document management — Portable document format — Part 2: PDF 2.0 International Organization for Standardization Retrieved from https://www.iso.org/standard/75839.html ) で定義されている「FitB」デスティネーションタイプをサポートするために、PDFBoxのデスティネーション階層を拡張した具象実装クラスです。ユーザーがこのデスティネーションを使用するリンクやブックマークをアクティブにすると、PDFビューアは拡大率とスクロール位置を調整し、ターゲットページのコンテンツのバウンディングボックス全体をウィンドウ内に表示します。バウンディングボックスは、ページのメディアボックス(物理的なページ寸法)ではなく、コンテンツの境界によって決定されます。つまり、空白の余白を除外し、実際の可視コンテンツに焦点を当てます。これは、余白を含むページ全体を表示するPDPageFitDestinationや、垂直方向のフィッティングのみを制御するPDPageFitHeightDestinationなど、他のデスティネーションタイプとは異なります。

重要性

PDFナビゲーションシステム、アクセシビリティ機能、またはドキュメント処理ワークフローを構築する開発者にとって、PDPageFitBoundingBoxDestinationは、ユーザーがリンクをたどる際にコンテンツをどのように表示するかを正確に制御します。これは、余白サイズが変化する文書や、 ( Citation: N.A., (N.A.). (). Document management applications — Electronic document file format enhancement for accessibility — Part 1: Use of ISO 32000-1 (PDF/UA-1) International Organization for Standardization Retrieved from https://www.iso.org/standard/64599.html ) などの標準に準拠したアクセシブルなPDF文書を作成する際に特に重要です。予測可能なナビゲーション動作は、支援技術の使いやすさを向上させます。Tagged PDF ( Citation: , (). Retrieved from https://pdfa.org/resource/tagged-pdf-best-practice-guide-syntax/ ) を扱う際、適切なデスティネーション処理により、スクリーンリーダーなどのアクセシビリティツールが、過度な空白に混乱することなく、正しいコンテンツ領域にユーザーを誘導できます。このクラスにより、開発者は任意のページ境界ではなくコンテンツに焦点を当てた、ユーザーフレンドリーなナビゲーションをプログラムで作成できます。

仕組み

PDPageFitBoundingBoxDestinationクラスは、 ( Citation: N.A., (N.A.). (). Document management — Portable document format — Part 2: PDF 2.0 International Organization for Standardization Retrieved from https://www.iso.org/standard/75839.html ) で定義されているように、特定のパラメータをPDFのデスティネーション配列構造にエンコードすることで機能します。インスタンス化される際、開発者はターゲットページオブジェクトを指定し、クラスは「FitB」指定を含む適切なデスティネーション配列を生成します。PDFビューアはこのデスティネーションを読み取り、ページ上のすべてのコンテンツストリーム、注釈、可視要素を分析してそれらの集合的な境界を決定することで、バウンディングボックスを計算します。その後、ビューアはこのバウンディングボックスを利用可能なウィンドウスペース内に収めるように、ズームレベルとスクロール位置を調整します。Apache PDFBoxでは、開発者は通常、PDOutlineItem(ブックマーク)オブジェクトやPDAnnotationLinkオブジェクトを構築する際にこのクラスのインスタンスを作成し、setDestination()メソッドにデスティネーションを渡します。このクラスは、PDF文書が保存される際にデスティネーションパラメータのシリアライゼーションを自動的に処理し、異なるPDFリーダー間でのビューア互換性を保証します。

関連用語

  • PDDestination – Apache PDFBoxにおけるすべてのデスティネーションタイプの抽象基底クラス
  • PDPageFitDestination – ビューアウィンドウ内にページ全体を収めるデスティネーションタイプ
  • PDOutlineItem – ナビゲーションターゲットとしてデスティネーションを使用するブックマークエントリクラス
  • PDAnnotationLink – クリックアクションのためにデスティネーションを参照できるリンク注釈クラス
  • Bounding Box(バウンディングボックス) – PDFページ上のすべての可視コンテンツを含む最小の矩形

出典

(N.A.) (2020)
(N.A.). (). Document management — Portable document format — Part 2: PDF 2.0 International Organization for Standardization Retrieved from https://www.iso.org/standard/75839.html
PDF Association (2023)
(). Retrieved from https://pdfa.org/resource/tagged-pdf-best-practice-guide-syntax/
(N.A.) (2014)
(N.A.). (). Document management applications — Electronic document file format enhancement for accessibility — Part 1: Use of ISO 32000-1 (PDF/UA-1) International Organization for Standardization Retrieved from https://www.iso.org/standard/64599.html