Table of Contents

Namespace PdfEngine.Vector.Text

Classes

PdfStructElement

A structure element of a tagged PDF as one page sees it.

PdfStructureTree

The structure tree of one page (ISO 32000-2 14.7), built as PDFium builds it for FPDF_StructTree_GetForPage: the page's /StructParents entry in the parent tree names the elements that own its marked content; those and their ancestors up to the root are the tree, with every /K entry kept in place (null where it is not an element of this page).

PdfTextExtractor

Builds PdfTextPages for the pages of a PdfVectorDocument: the native replacement of PDFium's FPDFText_LoadPage. Fonts are resolved once per document, and recent pages are kept within a character budget, since search and selection read the same pages repeatedly. Prefetch(PdfVectorDocument, int) builds a page's text in the background (after the page is drawn, say) so that the first selection or search on it does not wait.

PdfTextPage

A page's text the way a reader's text layer has it: characters in reading order, with the spaces and line breaks the layout implies, a box per character and the page text as one string. It follows PDFium's text page (CPDF_TextPage) rule for rule, so that search, selection and copy behave as they did with PDFium: content order within a line, lines ordered by position, objects drawn twice for a bold effect dropped, spaces generated from gaps between glyphs and objects, "\r\n" between lines, line-end hyphens marked, ligatures (U+FB00–FB06) split, /ActualText in place of the glyphs it covers, right-to-left runs reversed. Boxes are in default user space (the page's own coordinates, not offset by its crop box, unrotated).

PdfVectorTextService

The native IPdfTextService: word segments, page text and search from PdfTextPage, with the same results (and the same normalized-coordinate and padding conventions) as the PDFium text service it replaces. It works on a PdfVectorDocument; a document opened by another engine is read through a vector document attached to it (Attach(IPdfDocument, PdfVectorDocument)) or, failing that, opened from its file.

Structs

PdfTextRect

A rectangle by its edges in PDF orientation (y up), with the semantics of PDFium's float rectangle that the text page's rules are written against: a zero-width rectangle is a valid point or line (not "nothing"), intersecting disjoint rectangles gives all zeros, and union and containment normalize first.

Enums

PdfTextCharType

What a character of the text page is.