Frequently asked questions
How do I get the complete text of a book ?
Epublib has the Book.getContents() method. This gives you all
Resources of the Book that can be reached via the Spine, the
TableOfContents or the Guide.
An epub file is basically a zip file. It contains HTML files for the
book content, CSS, images and fonts.
It also contains several XML files that contain the book’s title,
author and the order in which the chapters of the book should be read.
Epublib makes the contents of all the files in the epub zip available via the
The Spine, is the list of html files in the order if you were to read the book
from cover to cover.
The Spine often does not contain the cover page.
The Table of Contents
The Table of Contents contains links to various html files and sections within those files.
There may be more than one Table of Content entry pointing to the same html file.
There may be html files to which there is no Table of Content pointing.
The Guide is a collection of links to ‘special’ pages. Examples of these are the cover (which is the only one widely used), the list of images page, the table of contents page, etc.
The problem of this is that none of these methods guarantee to give you the entire contents of the book.
Sometimes large HTML files are split up in pieces to save memory.
These individual pieces will all be in the Spine, but only the first piece will be referred to by the Table of Contents.
The Table of Contents may point to chapters that are not in the Spine or the Guide.
Finally there may be HTML files in the epub file that are referenced by none of these indexes.
How do I display a book’s content on Android ?
Use a android.webkit.WebView to display the html content.
How do I display a book’s images on Android ?
Make a subclass of android.webkit.WebView that overloads the loadUrl(String) method in such a way that it loads the image from the Book instead of the internet