Tagged PDF adds a layer of semantic structure to a PDF that is invisible in normal viewing but essential for accessibility and document reflow. Without tags, a PDF is a collection of drawing instructions — paint this text at these coordinates, draw this line here — with no information about what that content means. With tags, the same PDF carries a logical structure tree that identifies headings, paragraphs, lists, tables, figures, and other elements, enabling screen readers to read the document correctly, reflow engines to re-paginate it for smaller screens, and search engines to understand its organisation. Tagged PDF is the technical foundation of PDF/UA (ISO 14289) accessibility compliance. It is also required by Section 508, WCAG 2.1 PDF techniques, and increasingly by EU public sector accessibility legislation. This guide covers the structure tree, standard element types, role maps, marked content sequences, and how to create and validate tagged PDFs.

The structure tree and marked content sequences

Tagged PDF operates through the interaction of two parallel systems: The structure tree (stored in the document catalogue's /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

The PDF specification defines a standard set of structure element types organised into several categories: Document-level grouping elements: - /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

The standard element types cover most common document structures, but specialised documents may need custom element types. PDF's role map mechanism allows this. A role map (/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.

Creating tagged PDFs from authoring tools

Microsoft Word to PDF — Word's built-in PDF export (Save As > PDF) creates a tagged PDF when the "Document structure tags for accessibility" option is enabled (checked by default in current Word for Windows). Heading styles (Heading 1, Heading 2) export as H1, H2 tags. Properly styled lists export as L/LI/LBody structures. Images with alt text export with /Alt attributes. The tag quality is generally good for simple documents but may require review for complex layouts. Adobe InDesign to PDF — InDesign's PDF export with "Create Tagged PDF" checked produces tagged output. InDesign gives direct control over the tag hierarchy via the Articles panel and Object Export Options. For print-quality publications, InDesign produces the highest-quality tagged PDF of any mainstream authoring tool. Adobe Acrobat Pro — manual tagging and remediation — Tools > Accessibility provides the Reading Order tool (for quick initial tagging), the Tags panel (for detailed structure tree editing), and the accessibility checker. The Add Tags to Document feature runs an auto-tagger that requires human review. For full remediation of complex documents, the Tags panel is the primary tool. PDF libraries — iText (commercial) has full tagged PDF support. Apache PDFBox can create tagged PDFs via its PDDocument and PDStructureElement APIs. Typesetting systems like LaTeX (with the tagpdf package) and CSS Paged Media implementations (Prince, Antenna House) produce well-tagged output.