Package-level declarations

Types

Link copied to clipboard

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.

Link copied to clipboard
class EpubFormatException(message: String, cause: Throwable? = null) : KiteFormatException

Raised when bytes are not a readable EPUB: no container, no OPF, empty spine.

Link copied to clipboard
class EpubLink

A tappable link region on an EpubPage. rect is in display space (y-down; y-min stored in Rectangle.bottom). href is either zipPath#fragment (internal, resolve with the document's href navigation) or an external URL.

Link copied to clipboard

Publication metadata surfaced to a reader UI: Dublin Core fields plus the cover image and reading direction. Paths are zip-absolute.

Link copied to clipboard

One reflowed EPUB page: paints backgrounds/borders, then text lines and images.

Link copied to clipboard
data class EpubSettings(val pageWidth: Double = 400.0, val pageHeight: Double = 640.0, val fontSize: Double = 12.0, val margin: Double = 36.0, val fontFamily: ReaderFontFamily? = null, val lineHeightScale: Double = 1.0, val textColor: RgbColor? = null, val backgroundColor: RgbColor? = null, val justify: Boolean? = null, val usePublisherCss: Boolean = true)

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.

Link copied to clipboard

Generic font family a reader app can force via EpubSettings.fontFamily.

Link copied to clipboard

A publication's navigation tree, from EPUB 3 nav.xhtml or EPUB 2 toc.ncx.

Link copied to clipboard
class TocEntry

One table-of-contents node. spineIndex is -1 when the target isn't in the spine.

Link copied to clipboard
class ZipReader(bytes: ByteArray)

Minimal ZIP reader for EPUB / OCF containers. Parses the central directory, then reads entries on demand (STORED or raw DEFLATE via the shared Inflate).