Expand description
Text extraction: runs each page through the content interpreter with a device that collects glyphs, then groups them into lines and words.
- Coordinates are in the page’s displayed space: origin at the crop
box’s lower-left corner,
/Rotateapplied, y up, in points. - Reading order is the content stream’s, with glyphs that continue the
same baseline joined into one line and gaps wider than a fifth of the
font size read as spaces (like
pdftotext -raw). /ActualTextreplaces the glyphs it covers; invisible text (rendering mode 3, as in OCR layers) is included.
Structs§
- Page
Text - The text of one page.
- Text
Char - One character (or
/ActualTextreplacement) as drawn. - Text
Extractor - Extracts text from a document. Fonts are loaded once and shared across pages.
- Text
Line - A line of text.
- Word
- A word: characters between spaces on one line.