View Single Post
Old 05-29-2013, 03:03 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,556
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by DaleDe View Post
Adobe Digital Editions is the most popular reader for ePub. They use 1024 readable characters to determine a page size so no matter what size screen or font size there will be a one to one correspondence to the page number.
Not exactly that way. If I remember correctly, it's one page per 1024 bytes in the compressed file (so changing the compression level does change the number of pages), and then the pages are more or less evenly distributed by displayed characters (or maybe just characters, so comments and HTML code would count).

Ah, the relevant information is in the wiki: https://wiki.mobileread.com/wiki/Adob...s#Page_numbers

Quote:
Originally Posted by mattcurtis
I'm building an ePub reader, and I need to calculate and display the user's position inside of that ePub. However, ePub section/chapter size/word per page and and styling vary, which makes this a bit more difficult than I'd like
Well, why not use a percent position? Beware of using the word "chapter", as not all books are split at chapter level, and even when they are the numbering could not match the actual chapter numbering, and that would be confusing.
Jellby is online now   Reply With Quote