docx library
DOCX 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.
- ReadingOrderItem
- One entry of a book's reading order.
- TextFile
- Represents a text book file.
Enums
- BookFormat
- The book formats supported by unseal.
Functions
-
parseDocxArchive(
Archive archive) → DocumentBook -
Parses an already decoded DOCX
archive. -
parseDocxBook(
Uint8List bytes) → DocumentBook - Parses a DOCX package into the common document-backed book model.
-
readDocxMetadata(
Uint8List bytes) → BookMetadata - Reads only the metadata from a DOCX package.
-
readDocxMetadataFromArchive(
Archive archive) → BookMetadata -
Reads only the metadata from an already decoded DOCX
archive.
Exceptions / Errors
- DocxException
- Base error for a DOCX package that cannot be read by unseal.
- InvalidDocxPackageException
- Thrown when the input is not a readable ZIP/Open XML package.
- InvalidDocxXmlException
- Thrown when a required XML part is malformed or has the wrong root.
- MissingDocxPartException
- Thrown when a required Open XML part is absent from the package.