Package-level declarations
Types
A parsed EPUB, reflowed onto fixed-size pages and rendered through the shared KiteCanvas the PDF engine uses. The second document handler on :kitepdf-core.
An element that embeds a web document on an EpubPage: an inline frame, or an object whose type is HTML or XHTML (#40). The page paints the embedded document in the box when it is a document of the book (#528, #612), and else an object's fallback. An app can place a web view of its own over rect for a URL outside the book, which the page does not show.
What kind of element embeds a web document on a page.
Raised when bytes are not a readable EPUB: no container, no OPF, empty spine.
Where an element is on a page (#36).
Whether pages reflow or keep the size the author set: rendition:layout. ROLL, of EPUB 3.4, keeps each chapter's size too and shows the chapters as one strip with no gap, as a webtoon or a scroll reads (#506).
A tappable link region on an EpubPage. rect is in display space (y-down; y-min stored in KiteRectangle.bottom). href is either zipPath#fragment (internal, resolve with the document's href navigation) or an external URL. kind says what the link is for, such as a note reference, which a reader can open in place with EpubDocument.linkTarget.
What a link is for, read from the link's own markup: its epub:type from the EPUB 3 Structural Semantics Vocabulary, its DPUB-ARIA role, or the rel that EPUB 2 converters write. A reader can open a note in place instead of turning the page. EpubLink.kind carries it.
The element an internal link points at, read from the book's markup without laying its chapter out. EpubDocument.linkTarget builds it.
A <video> or an <audio> element on an EpubPage: where it sits, what it plays and how. The page paints the poster there, or a plain grey box, so an app can place its own player over rect and read the bytes with EpubDocument.resource. The kitepdf-media artifact is such a player, and draws the play control (#31).
What a media element plays.
The media overlay of one chapter: its clips in document order, with nested sequences flattened.
One source of a media element, in the order the element lists them. href is a zip path, as EpubDocument.resource reads it, or a URL with a scheme. type is the media type that the element or the manifest gives, or null.
One <track> element of a media element: a WebVTT file of timed text (#483).
Publication metadata surfaced to a reader UI: Dublin Core fields plus the cover image and reading direction. Paths are zip-absolute.
The media overlay metadata of a book, EPUB 3.3 Media Overlays: how long the narration runs, who reads it, and the classes a reading system gives the element being read (#36). EpubDocument.markNarration gives an element these classes.
Which way the author asks the reader to hold the device: rendition:orientation.
One clip of a media overlay: a piece of the text, and the part of an audio file that reads it.
The side of a two-page spread that the first page of a chapter asks for: page-spread-left, page-spread-right, or rendition:page-spread-center for a page shown alone.
One stop in a page's reading order.
How a book, or one chapter of it, asks to be shown: the rendition properties of EPUB 3.3 (the Packages specification, section 4). The book's values come from the package metadata. A chapter's values are the ones its spine entry sets, and the book's values for the rest. A value that is not set, or that this library does not know, reads as the default.
Fetches a resource that a book names by an absolute https URL instead of a file in its container, such as a font or an image on a web server (EPUB 3.3, 3.6). Reading systems should support such remote resources, and should load them over https only (EPUB Reading Systems 3.3, 3.3), so the book never passes another scheme here: an http URL is refused before it reaches the fetcher (#38).
What a viewer needs from a book's scripts, without knowing how they run (#41).
Runs the scripts of a book's chapters over the library's own parse and layout (#41).
Reader layout settings. All values in points. Change them at runtime with EpubDocument.withSettings (or the withFontSize/withPageSize/withMargin shorthands) to re-flow without re-parsing the book.
When a reader shows two pages side by side: rendition:spread. The deprecated value portrait reads as BOTH, as EPUB 3.3 asks.
What the element a link points at is, read from its own epub:type or role, else from the section that holds it.
What a text track of a media element holds, as the kind of its <track> element says (HTML, the track element).
Generic font family a reader app can force via EpubSettings.fontFamily.
A publication's navigation tree, from EPUB 3 nav.xhtml or EPUB 2 toc.ncx.
One table-of-contents node. spineIndex is -1 when the target isn't in the spine.
Moved to core so non-EPUB zip formats (CBZ) can read archives too.
Functions
Opens the EPUB at path, loading the WHOLE file into memory first (thin sugar over EpubDocument.open; there is no incremental file reader).
Opens the EPUB at path, loading the WHOLE file into memory first (thin sugar over EpubDocument.open; there is no incremental file reader).
Opens the EPUB at path, loading the WHOLE file into memory first (thin sugar over EpubDocument.open; there is no incremental file reader).