PdfBook class

A parsed PDF document.

The original bytes stay attached: the viewer's facsimile mode re-serves them to the system webview for pixel-faithful page rendering, the same bytes the text layer and reflow were extracted from. files.html carries one reflowed page per document page, so documentText, search, progression and TextLocator offsets all address page i through section i — one canonical text space shared by both reading modes.

Inheritance

Constructors

PdfBook({required Uint8List bytes, required BookMetadata metadata, required List<PdfPage> pages, required Navigation navigation, BookFormat format = BookFormat.pdf, List<TextFile> pageFiles = const <TextFile>[], List<PdfPageText> pageTexts = const <PdfPageText>[], List<PdfPageLayoutExtraction> pageLayouts = const <PdfPageLayoutExtraction>[], TextProfile? canonicalTextProfile, List<BinaryFile> extractedImages = const <BinaryFile>[]})
Creates a PdfBook from already parsed parts.

Properties

archiveEntries → List<ArchiveEntry>
The physical entries of the book's container archive (e.g. the EPUB zip), manifest-independent: infrastructure files such as META-INF/container.xml and stray entries are included, nothing is parsed. Empty for formats without an archive container (MOBI, plain FB2).
no setterinherited
bytes → Uint8List
The full original document bytes (kept for facsimile rendering).
final
canonicalTextProfile → TextProfile?
The extraction plan and mode that produced the canonical page text. Absent on manually assembled books with no known plan; their text indexes remain usable only in memory.
final
cover → BinaryFile
The cover: PDFs carry no raster cover a pure parser can extract, so the cover stays empty (hosts may raster page 1 themselves).
final
files → Files
The reflowed page documents (one per page) and the extracted JPEG images.
final
format → BookFormat
The format this book was parsed from.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hasTextLayer → bool
Whether text extraction found a usable text layer — scanned documents without one read in facsimile mode only.
no setter
metadata → BookMetadata
The format-agnostic metadata of this book.
final
The bookmarks outline as navigation.
final
pageCount → int
Number of document pages.
no setter
pageLayouts → List<PdfPageLayoutExtraction>
The per-page layout extraction (source lines, words, ruling lines), aligned with pages. Session headers carry none — their structures build inside the session's engine instead.
final
pages → List<PdfPage>
The document pages in reading order.
final
pageTexts → List<PdfPageText>
The extracted canonical text of each page, aligned with pages.
final
readingOrder → List<ReadingOrderItem>
One reading-order item per page: section i is page i.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statistics → BookStatistics
Reading statistics over the HTML content, computed once on first access.
latefinalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited