I want to read the epub book line by line and go through the next line.

58 views
Skip to first unread message

mani kandan

unread,
Jun 29, 2013, 5:33:02 AM6/29/13
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());
        }
       
Reply all
Reply to author
Forward
0 new messages