Optionalerrorthrow rejects on failure (default); collect returns partial results with diagnostics.
OptionalmathMath on pages typeset with TeX. latex rebuilds formulas from their glyphs (math fonts,
sub- and superscripts, fractions, roots, accents) and puts them in the text as $…$ LaTeX,
for Markdown and other math-aware consumers; text (default) keeps the glyphs' Unicode
text. Pages without TeX math fonts are unaffected; latex costs one more glyph scan on
pages with them.
OptionalminRecognized words with a provider confidence below this value are dropped, which removes most noise from photos and graphics. Range 0–1; default 0.3; 0 keeps every word.
OptionalocrDefaults to auto when a provider was supplied, otherwise off. Explicit auto/always requires a provider. Auto recognizes embedded images, and renders the whole page instead when a page has no native text but is drawn with many vector shapes (outlined lettering).
OptionalonCalled during work. Keep callbacks lightweight and avoid throwing.
OptionalpagesOne-based pages to extract; omitted means all pages.
OptionalsignalAborts queued work promptly; a synchronous engine decode already running may finish before cleanup.
OptionaltablesDetect tables from ruling lines and aligned text columns (default true). Detected tables are returned in TextPage.tables and read row by row in the text. false skips detection and the extra vector-graphics scan it needs on pages with column-like text.
Page selection, OCR policy and behavior when individual page or OCR-region operations fail.