Companion

object Companion

Functions

Link copied to clipboard
fun open(bytes: ByteArray, settings: EpubSettings): EpubDocument

Open bytes at settings. Reads the container, the OPF and the table of contents; chapters parse and lay out when something asks for them.

fun open(bytes: ByteArray, pageWidth: Double = 400.0, pageHeight: Double = 640.0, fontSize: Double = 12.0, margin: Double = 36.0): EpubDocument
Link copied to clipboard
fun EpubDocument.Companion.openFile(path: String, settings: EpubSettings = EpubSettings()): EpubDocument

Opens the EPUB at path, loading the WHOLE file into memory first (thin sugar over EpubDocument.open; there is no incremental file reader).

fun EpubDocument.Companion.openFile(path: String, settings: EpubSettings = EpubSettings()): EpubDocument

Opens the EPUB at path, loading the WHOLE file into memory first (thin sugar over EpubDocument.open; there is no incremental file reader).

fun EpubDocument.Companion.openFile(path: String, settings: EpubSettings = EpubSettings()): EpubDocument

Opens the EPUB at path, loading the WHOLE file into memory first (thin sugar over EpubDocument.open; there is no incremental file reader).

Link copied to clipboard
fun openOrNull(bytes: ByteArray, settings: EpubSettings = EpubSettings()): EpubDocument?

open, but null instead of EpubFormatException on a malformed book.