View Single Post
Old 10-07-2013, 03:06 PM   #817
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,343
Karma: 171313058
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by John F View Post
Looks like they have everything they need. They do display page numbers now. They know the total number of pages (they are displaying the total number of pages). They know/calculate the particular page when you navigate using the table of contents. So when the TOC is shown, showing the page numbers should be trivial.

Actually, navigating using the table of contents uses links not page numbers. So calculating the approximate page number and then inserting it into the file to be displayed is not that trivial and totally non-standard. To make it even more fun, are we talking pages displayed in terms of the number of screens? A page number using the Adobe page counting algorithm? A fixed page number using the non-standard Adobe page-map?
Page numbers in a fixed layout epub? For the joy of reading a fixed layout epub, try reading a pdf.

While you're at it, take a good look at the Adobe algorithm used for calculating the page numbers that Kobo display in the right margin (if enabled) and for the footer. Look at a chapter file, count the number of 1024 byte blocks of compressed data remembering to always round up (1023 is 1 page, 1025 is 2 pages but the page number will be split at 512/513). If the epub has Adobe's ADEPT DRM, use the fudge factor for DRMed epubs since it adds a few bytes to each file. Now try to get those synthetic page numbers to relate to page numbers in a dead tree book.

And just to add more joy, the page numbering algorithm used by the ACCESS renderer is slightly different as well.

Regards,
David
DNSB is offline   Reply With Quote