Deriving HTML from Tagged PDF

The engine walks the structure tree in logical order, resolves the role map and the PDF 2.0 namespaces, maps standard structure types to semantic HTML5 elements, embeds associated or structure-derived MathML 3.0 for Formula elements, and extracts marked-content text runs with /ActualText overrides in structure reading order

THotPDF members

THotPDF.ExtractPageGlyphsForHTML(PageIndex, Glyphs) returns positioned, Unicode-resolved glyphs for a loaded page or, before EndDoc, for the active page through a font resolver that understands the pre-save double-byte glyph identifiers

THotPDF.ExportLoadedTaggedPDFToHTML(...), in default-options and explicit-THPDFDeriveHTMLOptions overloads, derives the HTML and returns it through a THPDFDeriveHTMLResult record carrying title, language, element, MCID-run, formula and table counts, untagged glyph count and truncation flag; custom role mappings are synchronized into the structure root before derivation

THotPDF.ExportLoadedTaggedPDFToHTMLFile(...), in the same two overload shapes, writes the derived HTML to disk instead of returning it

The options record controls the document wrapper, the default stylesheet, the untagged fallback, and the structure-element and depth limits

THotPDF.EnableTaggedPDF produces the structure the engine consumes