azw4 library
AZW4 PDF-wrapper parsing entry points.
Classes
- ArchiveEntry
- A physical entry of a book's container archive.
- Azw4PdfPayload
- The PDF payload recovered from an AZW4 wrapper.
- 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.
- ReadingOrderItem
- One entry of a book's reading order.
- TextFile
- Represents a text book file.
Enums
- BookFormat
- The book formats supported by unseal.
Functions
-
extractAzw4Pdf(
Uint8List bytes) → Uint8List -
Extracts only the embedded PDF bytes from
bytes. -
extractAzw4PdfPayload(
Uint8List bytes) → Azw4PdfPayload - Extracts the embedded PDF from an AZW4/PalmDB wrapper.
-
parseAzw4Book(
Uint8List bytes, {String password = ''}) → PdfBook - Parses an AZW4 PalmDB/MOBI wrapper by extracting and delegating its PDF payload to the existing PDF reader.
-
readAzw4Metadata(
Uint8List bytes, {String password = ''}) → BookMetadata - Reads AZW4 metadata through the same extracted PDF path used by parseAzw4Book.
Exceptions / Errors
- Azw4DrmProtectedException
- Thrown when the MOBI wrapper advertises encryption/DRM.
- Azw4Exception
- Base exception for an AZW4 container that cannot be safely read.
- Azw4InvalidContainerException
- Thrown when a PalmDB/MOBI wrapper is malformed or violates the structural limits needed for safe record extraction.
- Azw4PdfNotFoundException
- Thrown when an AZW4 container has no complete embedded PDF.