PDFium Component Docs

IsTagged プロパティ

この API エントリでは識別子、シグネチャ、コードブロック、PDF 用語を元の表記のまま保持します。
コンポーネント: TPdf  ·  ユニット: PDFium
document が accessibility 用の structure tree を宣言しているかどうかです

構文

property IsTagged: Boolean; // read only

説明

IsTagged は、document catalog が /StructTreeRoot を参照しているときに True を返します。これは PDF logical structure tree の root です (PDF 1.7 spec section 14.7)。Tagged PDF は、document の reading order、heading level、table structure、list、image の alt-text、そして screen reader、reflow engine、content extractor が頼るその他の semantic markup を保持します。PDF/UA-1 と PDF/A-2a/3a の conformance には Tagged PDF が必要です

ActiveFalse のとき、structure tree が宣言されていないとき、または structure tree はあるが空のとき、この property は False です。実際の PDF には タグ付きでない ものも多く、特に scan した document、print-driver の出力、2010 年以前の tool export ではそうです。authoring tool の Tagged PDF support は改善していますが、まだばらつきがあります

IsTagged は軽い header check で、routing decision に向いています。タグのない file では structure-tree の抽出を飛ばす (単に空 array を返す) か、operator に accessibility warning を出せます。詳細な tree は StructureElements で得られ、tree を level、parent index、type name、role を持つ TPdfStructureElement record の flat array に materialize します

備考

if not Pdf1.IsTagged then
  Log.Add('Warning: PDF is not tagged. Screen-reader output will be unreliable.');
if Pdf1.IsTagged and (Pdf1.Language = '') then
  Log.Add('Tagged PDF without /Lang - fails PDF/UA.');

関連項目

StructureElements, Language, FormType