pdf library

PDF parsing entry points.

Classes

ArchiveEntry
A physical entry of a book's container archive.
BinaryFile
Represents a binary book file.
Book
A fully parsed book, independent of its source format.
BookCover
A book cover: raw bytes plus the detected image type.
BookFile
Abstract representation of a file inside a book container.
BookMetadata
Format-agnostic book metadata extracted from any supported book file.
BookStatistics
Basic reading statistics computed from book content.
DocumentBook
A document-backed book produced by text and office-format adapters.
Files
The files contained in a parsed book.
The navigation (table of contents) of a book.
Represents a navigation point (table of contents entry) in a book.
PdfBook
A parsed PDF document.
PdfCellRange
A range inside one source line's text: [start, end) in UTF-16 code units of the line at lineIndex. The unit cells and table regions reference text by.
PdfColumnRegion
One detected column region: the page-area the region spans and the blocks it contains, in reading order.
PdfImageBox
An image placement on the page.
PdfMappedPosition
One mapped position: an offset range in a target text.
PdfPage
One PDF page: geometry, rotation and the raw resources dictionary.
PdfPageGeometry
The visible geometry of one page and the way back to the document's own coordinates.
PdfPageLayoutExtraction
The layout extraction of one page: the plain text extraction plus the primitives the structure layer segments — per-character-derived words and the page's axis-aligned ruling lines.
PdfPageStructure
The stable structure of one PDF page: words, blocks, columns and tables with verifiable geometry, the page's source lines, and the mapping from source positions to a canonical text.
PdfPageText
The extracted content of one PDF page: canonical text lines and image placements, in the page's top-left pixel space (points).
PdfPositionAmbiguous
The target text carries the line more than once and the available evidence cannot pick one occurrence. The candidates come back in target order.
PdfPositionMapped
The range resolved to a canonical offset range.
PdfPositionMapping
Sealed mapping outcomes: exactly one per query, with its reason.
PdfPositionMissing
The anchor does not resolve in the target, for the reason carried.
PdfPositionUnsupported
The mapping cannot be computed for the reason carried.
PdfRuleLine
One axis-aligned ruling line in top-left page points — the input table detection clusters into lattices.
PdfSourceRange
The source-space anchor: page, line and bounds inside the line's text.
PdfTableCell
One table cell: its grid position, geometry, text and the ranges of source-line text it covers.
PdfTableRegion
One detected table region: cells in a rows-by-columns grid, the detection algorithm that produced it, and whether ruling lines backed the grid.
PdfTableUnsupported
A table-shaped area the detector refused to call a table, with the reason. Unsupported is a diagnosis, never a silently empty result.
PdfTextBlock
One block of text: words the segmentation joined into lines and the block's bbox, role and reading-order position.
PdfTextLine
One line of text: the canonical unit the extractor emits.
PdfWord
One word on the page: characters grouped by real glyph advances and spacing, with the geometry those metrics establish.
ReadingOrderItem
One entry of a book's reading order.
TextFile
Represents a text book file.
TextProfile
The extraction profile a canonical text was produced under.

Enums

BookFormat
The book formats supported by unseal.
PdfBlockRole
The editorial role a block plays on the page.
PdfPositionMissingReason
Why a source range did not map to a canonical position.
PdfPositionUnsupportedReason
Why a mapping cannot be computed at all.
PdfTextQuality
What the parser can establish about a page's extracted text.

Functions

buildPdfPageStructure({required PdfBook book, required int pageIndex}) → PdfPageStructure
Builds the stable structure of one page of an eagerly parsed book: words, blocks, columns and tables with geometry, the source-line space and the mapping into the book's canonical text.
parsePdfBook(Uint8List bytes, {String password = ''}) → PdfBook
Parses a PDF document from raw bytes.
pdfPlanRevision(PdfReflowPlan plan) → String
Computes the sha256:-prefixed revision of a reflow plan: the plan's decisions hashed bit-exactly, so the full-document plan and a session's sampled plan carry different revisions whenever they differ at all — never the same revision by convenience.
readPdfMetadata(Uint8List bytes, {String password = ''}) → BookMetadata
Reads only the metadata of a PDF document from bytes, opening encrypted documents with password.

Exceptions / Errors

PdfEncryptedException
Thrown when a PDF document is encrypted and the supplied (or empty) password does not open it.
PdfException
Thrown when a PDF document cannot be parsed.