property IsTagged: Boolean; // read only
IsTagged returns True when the document catalog references a
/StructTreeRoot — the root of the PDF logical structure tree
(PDF 1.7 spec section 14.7). Tagged PDFs encode the document’s reading order,
heading levels, table structure, lists, alt-text on images, and other semantic markup
that screen readers, reflow engines, and content extractors rely on. PDF/UA-1 and
PDF/A-2a/3a conformance both require tagged PDF.
The property is False when Active is False,
when no structure tree is declared, or when the structure tree is present but empty.
Many PDFs in the wild are not tagged — especially scanned documents,
print-driver output, and tool exports from before 2010. Tagged-PDF support in
authoring tools is improving but still uneven.
IsTagged is a cheap header check, suitable for routing decisions: skip
structure-tree extraction on untagged files (it will simply return empty arrays), or
surface an accessibility warning to the operator. The detailed tree is available
through StructureElements, which materialises the tree into a flat array
of TPdfStructureElement records with level, parent index, type name and
role.
Language (/Lang) to perform the two
minimum-viable PDF/UA checks before validating with a full conformance tool./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.');