Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6131889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:02:00+00:00 2026-05-23T17:02:00+00:00

I found a solution for reading epub books in android using epublib. I am

  • 0

I found a solution for reading epub books in android using epublib. I am able to read the subtitles of the book. But I didn’t find a way to read the line by line of the content. How can I acheive this?

Sample code for getting titles of the book is

  private void logTableOfContents(List<TOCReference> tocReferences, int depth) {
    if (tocReferences == null) {
        return;
    }
    for (TOCReference tocReference : tocReferences) {
        StringBuilder tocString = new StringBuilder();
        StringBuilder tocHref=new StringBuilder();
        for (int i = 0; i < depth; i++) {
            tocString.append("\t");
            tocHref.append("\t");
        }
        tocString.append(tocReference.getTitle());

        tocHref.append(tocReference.getCompleteHref());
        Log.e("Sub Titles", tocString.toString());
        Log.e("Complete href",tocHref.toString());

        //logTableOfContents(tocReference.getChildren(), depth + 1);
    }
}

Got this code from http://www.siegmann.nl/epublib/android

How can I get the story of the book…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:02:01+00:00Added an answer on May 23, 2026 at 5:02 pm

    I’m not sure is that is the way to navigate in epub file. As far as I know (till now – I’m still learning), better way to get all book cocntent is based on spine section.
    But still – I don’t know how to connect this two things (TOC and real spine) with epublib interface.
    According to documentation:
    “The spine sections are the sections of the book in the order in which the book should be read. This contrasts with the Table of Contents sections which is an index into the Book’s sections.”

    that is something – if You likie – this is a snippet:

    Spine spine = new Spine(book.getTableOfContents());
    for (SpineReference bookSection : spine.getSpineReferences()) {
                Resource res = bookSection.getResource();
                    try {
                        InputStream is = res.getInputStream();
                        //do something with stream
                    } catch (IOException e) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this solution which works, but I find it hard to believe there
I've tried reading the existing posts on this subject, but haven't found a solution
I have found a proper solution to my problem but even after reading mysql
Edited: SOLUTION FOUND. This is strange and not the best solution, but I just
I found the solution for this question in C# , but I can't translate
problem euler #5 i found the solution but i don't know why this first
after reading through a couple similar Qs/As I haven't quite found the solution I'm
I've recently been reading Louis Davidson's book on Sql Server Database Design and found
I found similar questions while searching for a solution for my problem but I
After long investigations and reading this question I still didn't get a good solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.