mani kandan
unread,Jun 29, 2013, 5:33:02 AM6/29/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to epu...@googlegroups.com
I have used this code and got the book details. But I want to read the book contents line by line and go through the next pages... How can I achieve that?
AssetManager assetManager = getAssets();
try {
// find InputStream for book
InputStream epubInputStream = assetManager.open("books/alice3.epub");
EpubReader epubReader = new EpubReader();
// Load Book from inputStream
Book book = epubReader.readEpub(epubInputStream);
// Log the book's authors
Log.v("epublib", "author(s): " + book.getMetadata().getAuthors());
// Log the book's title
Log.v("epublib", "title: " + book.getTitle());
Log.v("epublib", "contents: " +book.getContents());
// Log the book's coverimage property
Bitmap coverImage = BitmapFactory.decodeStream(book.getCoverImage()
.getInputStream());
Log.v("epublib", "Coverimage is " + coverImage.getWidth() + " by "
+ coverImage.getHeight() + " pixels");
// img_cover.setImageBitmap(coverImage);
// Log the tale of contents
logTableOfContents(book.getTableOfContents().getTocReferences(), 0);
} catch (IOException e) {
Log.e("epublib", e.getMessage());
}