View Single Post
Old 03-02-2015, 05:59 AM   #1235
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by njess View Post
I've just downloaded this plugin but when I read a book on my Aura the pages are all mixed up? How come? Is there anything I can do about it?
I can see that the pages are in the right order it's just the numbers that are completely off-they can go something like this: 1,2,3,54,21 and so on.
I have seen this in Kobo-synced kepubs too, so I don't think it is anything to do with this driver.

From what I can tell, the problem is that the kepub reader is much fussier than the epub reader about how the entries in the book's toc and spine are arranged, it expects the toc and spine to match exactly on the ordering of entries, any inconsistency can cause problems with page numbering. It also expects each entry to reference content in a seperate .html file, and if not then the in-book stats won't work properly.

I don't know of any automated way to fix it that always works, it is a matter of editing the toc and spine to remove inconsistencies, and splitting up the .html files so that each toc entry has its own file (An epub to epub conversion in Calibre can sometimes help with splitting the files, but it doesn't always work.)

Edit: These problems didn't usually show in Kobo-synced kepubs in the past, because the kepub reader only displayed the number of pages per chapter. It was only when Kobo added the new page numbering options that the inconsistencies between toc and spine became more of an issue.

Edit2: Here is an example from this book. When I read the kepub version synced direct from Kobo, the page numbers were fine for most of the book, but they were completely wrong when reading the Lexicon. What seems to have happened is that the publisher decided to move the Lexicon (contained in 9780061743948_chapter_34.html) from the back of the book to the front, updated the TOC but forgot to update the spine.

Spoiler:

Extract from OPF <manifest>:
Code:
		<item href="9780061743948_chapter_33.html" id="x_9780061743948_36" media-type="application/xhtml+xml"/>
		<item href="9780061743948_chapter_34.html" id="x_9780061743948_37" media-type="application/xhtml+xml"/>
		<item href="9780061743948_aboutauthor.html" id="x_9780061743948_38" media-type="application/xhtml+xml"/>
Extract from OPF <spine>
Code:
		<itemref idref="x_9780061743948_36"/>
		<itemref idref="x_9780061743948_37"/>
		<itemref idref="x_9780061743948_38"/>
Extracts from toc.ncx
Code:
            <navPoint id="np-6" playOrder="6">
              <navLabel>
                <text>Lexicon</text>
              </navLabel>
              <content src="9780061743948_chapter_34.html"/>
            </navPoint>
Code:
            <navPoint id="np-39" playOrder="39">
              <navLabel>
                <text>Chapter 8</text>
              </navLabel>
              <content src="9780061743948_chapter_33.html"/>
            </navPoint>

            <navPoint id="np-40" playOrder="40">
              <navLabel>
                <text>About the Author</text>
              </navLabel>
              <content src="9780061743948_aboutauthor.html"/>
            </navPoint>

Last edited by GeoffR; 03-02-2015 at 06:54 AM. Reason: Example
GeoffR is offline   Reply With Quote