Skip to main content

Module document

Module document 

Source
Expand description

Unified document facade — multi-page rendering, text extraction, metadata, bookmarks, and thumbnails.

Structs§

BookmarkItem
A bookmark / outline item.
DocumentInfo
Document metadata extracted from the info dictionary.
PageLink
One /Link annotation on a page: the region it covers and where it goes.
PdfDocument
High-level PDF document handle.
VisionAdvice
Why a page may be worth sending to a vision model (#624).

Enums§

LinkTarget
Where a page link points.

Functions§

gray_page
Render a page to Gray8 bytes at the given dpi: (width, height, data), row-major, top-left origin, 0 is black.
join_page_texts
Join per-page text the way pdftotext and mutool have for twenty years: a form feed (U+000C) after every page, preceded by a blank line so the last paragraph of a page is not glued to the separator.