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 が必要です
Active が False のとき、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 します
IsTagged は structure 上の test であって quality test ではありませんLanguage (/Lang) と組み合わせてくださいIsTagged を読むだけでは tree 自体は parse しません。catalog に /StructTreeRoot があるかを見るだけです
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.');