The structure tree and marked content sequences
/StructTreeRoot) is a tree of structure element objects. Each structure element has a type (e.g., /H1, /P, /Table), optional attributes, and children that are either other structure elements or content references.
Marked content sequences are regions in page content streams delimited by the BMC (Begin Marked Content) or BDC (Begin Dictionary Marked Content) and EMC (End Marked Content) operators. Each sequence has a tag name and optionally an inline or referenced property dictionary. Structure elements in the structure tree reference marked content sequences via marked content reference (MCR) objects that identify the page and the /MCID (Marked Content Identifier) of the sequence.
This two-part system means that: (1) The structure tree describes the logical document organisation; (2) The marked content sequences identify exactly which page content corresponds to each structure element; (3) Structure elements reference marked content sequences to connect the logical structure to the visual content.
Object references — Structure elements can also reference annotation objects (form fields, links) directly via object references (OBJR), not marked content sequences. A Link annotation is referenced from a /Link structure element via OBJR.Standard structure element types
/Document — Root element of a complete document
- /Part — A large-scale division of a document (part, chapter)
- /Art — An article (self-contained composition)
- /Sect — A section or chapter subdivision
- /Div — A generic block-level grouping element
- /Aside — Tangential content (sidebar, pull quote) — new in PDF 2.0 / PDF/UA-2
Block-level elements:
- /H, /H1–/H6 — Headings (H for generic heading, H1–H6 for levelled headings)
- /P — Paragraph
- /L — List container; /LI — List item; /Lbl — Label; /LBody — Body
- /BlockQuote — Block quotation
- /Caption — Caption for a figure or table
- /Index — Index
- /TOC / /TOCI — Table of contents / Table of contents item
- /FENote — Footnote or endnote — new in PDF 2.0 / PDF/UA-2
Inline-level elements:
- /Span — Generic inline text element (used for language changes, abbreviations)
- /Quote — Inline quotation
- /Note — Footnote reference marker
- /Reference — Cross-reference in text
- /BibEntry — Bibliography entry
Table elements:
- /Table — Table
- /TR — Table row
- /TH — Table header cell
- /TD — Table data cell
- /THead, /TBody, /TFoot — Table head/body/foot groups
Illustration elements:
- /Figure — Figure, photograph, or graphic (must have /Alt text)
- /Formula — Mathematical formula
- /Form — Form widget (AcroForm field)Role maps and custom element types
/RoleMap in the structure tree root) is a dictionary that maps custom element type names to standard element types. For example, a publisher might use /Chapter as their structure element type, mapped to /Sect in the role map. PDF viewers and accessibility tools that encounter /Chapter resolve it to its mapped standard type /Sect and treat it accordingly.
Role maps are important for:
- Legacy documents that use non-standard tag names from older tagging tools
- Domain-specific documents that need precise semantics not captured by the standard set
- PDF/UA compliance — every structure element type in a PDF/UA document must either be a standard type or be mapped via the role map to a standard type
The Matterhorn Protocol (published by the PDF Association) is the definitive test suite for PDF/UA-1 conformance. It defines 136 checkpoints organised into categories, many of which relate directly to structure tree correctness, role map completeness, and marked content integrity. PAC (PDF Accessibility Checker) implements Matterhorn Protocol checks.