Tags a document from its detected layout tree, with options.
public AutoTaggingResult AutoTag(AutoTaggingOptions options)
Whether to tag an already tagged document, the language, the figures' placeholder description.
ISO 32000-2 §14.8 (tagged PDF), §14.7 (logical structure), §14.6 (marked content). The layout tree is detected from the pages'
geometry (ExtractLayout(LayoutOptions)) and written as a structure tree under one Document element:
paragraphs P, headings H1-H6, lists L/LI/Lbl/LBody with ListNumbering,
tables Table/TR/TH/TD with RowSpan, ColSpan, Scope and Headers
(Table 384), figures Figure with a Layout BBox (Table 378) and a placeholder Alt, captions
Caption. The PDF 1.7 standard structure namespace is used, so nothing needs PDF 2.0.
Each page's own content is rewritten (RewriteContent(ContentEditor)): runs of operators that show
one element's content are wrapped in BDC/EMC with a new MCID (§14.7.5.2), registered in the parent tree; running
headers and footers become Pagination artifacts, other graphics outside figures Layout artifacts (§14.8.2.2).
Operators are never split or reordered and marked content nests properly with BT/ET and existing sequences
(§14.6.1), so the pages render exactly as before. A form XObject is tagged as a whole through its Do; an operator that
shows glyphs of two elements belongs to the one first in reading order. MarkInfo Marked is set; the changes can
be saved incrementally.
For PDF/UA-1 (ISO 14289-1; veraPDF rule identifiers): heading levels start at H1 and never skip one (7.4.2-1); text the
layout has no glyph for (hidden by optional content) becomes P elements and painting that paints nothing becomes
artifacts, on every page, so no content is left neither tagged nor an artifact (7.1-3). The glyphs inside a link annotation
go into a Link element with an object reference to it (§14.8.4.4.2), and their text becomes its Contents when it
has none (7.18.5); widgets go into Form elements and other annotations except printer's marks into Annot
elements after the page content (§14.8.4.4, 7.18.1, 7.18.4). Other descriptions are never invented: a PDF/UA save reports
them, and reports a figure whose placeholder Alt was not replaced (7.3-1). Fonts are not embedded.