PackageDocumentReader

Reads the OPF package document defined by namespace http://www.idpf.org/2007/opf.

Functions

Link copied to clipboard
fun findCoverHrefs(packageDocument: Document): Set<String>

All resources that have something to do with the cover page or cover image.

Link copied to clipboard
fun findTableOfContentsResource(tocResourceId: String, resources: Resources): Resource?

Finds the table-of-contents Resource. Tries the spine toc attribute, then common item-ids, then the first NCX-typed resource.

Link copied to clipboard
fun fixHrefs(packageHref: String, resourcesByHref: Resources): Resources

Strips off the package prefixes up to the href of the packageHref.

Link copied to clipboard
fun read(packageResource: Resource, epubReader: EpubReader, book: Book, resources: Resources)