Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#3413 closed defect (fixed)

Read: number of pages in epub books can change

Reported by: godiard Owned by: godiard
Priority: Unspecified by Maintainer Milestone:
Component: Read Version: Unspecified
Severity: Unspecified Keywords: 12.1.0, olpc-test-passed
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The epub files do not have information aboout pages, because the information is stored in files by chapters, and as a continuum html text.

The epub backend in the Read activity use a webkit widget to load the html file, and execute a javascript to calulate the document height, and based on this value, calculate the number of pages. The problem we have is, running this javascript code return different values at times. We use this value to calculate the position needed to scroll to position the document when the activity start at the same position the reader left the last session. Also based inthe scroll position, we update the toolbar widget with the page number, and show the bookmarks related to the page.

I researched how other book readers calculate the pages, and there are not a uniform solution.

  • readers using the Adobe code to display calculate the number of pages based in the size of the chapter file. [1] and [2]
  • fbreader use the library ZLibrary to calculate the number of pages [3] but this number are not related with the size in the webview, then are not useful for us without change a lot our code.
  • Other epub readers use css and javascript to paginate the text,

but this does not resolve for us how to update the information in our toolbar. [4] [5]

I have tried modifying the javascript code, but the returned values continue being different

[1] http://bookclubs.barnesandnoble.com/t5/NOOK-Book-Discussion/EPUBs-and-page-numbering/td-p/691602

[2] http://www.mobileread.com/forums/archive/index.php/t-166173.html

[3] http://stackoverflow.com/questions/6027477/how-the-fbreader-do-the-pagination-of-html-files-in-epub

[4] http://stackoverflow.com/questions/2808652/how-to-implement-page-break-in-epub-reader

[5] http://stackoverflow.com/questions/3636052/html-book-like-pagination?tab=active#tab-top

Change History (5)

comment:1 Changed 8 years ago by godiard

  • Keywords 12.1.0 added

comment:2 Changed 8 years ago by godiard

  • Keywords olpc-test-pending added

fixed in 31829913fe58cb95017f83a86aecaa05561ba611

comment:3 Changed 8 years ago by godiard

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 7 years ago by greenfeld

  • Keywords olpc-test-passed added; olpc-test-pending removed

The total number of pages in an ebook seems to remain consistent in 12.1.0 os11/Read-99. This is true regardless of where you resume reading in a book.

comment:5 Changed 6 years ago by dnarvaez

  • Milestone 0.96 deleted

Milestone 0.96 deleted

Note: See TracTickets for help on using tickets.