![]() |
#1 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
How are epub page numbers set?
I always thought it was xx number of characters that generally denoted a page on ereaders and that we had no control over it, but I'm starting to think there must be some setting that can define the number of characters per page number.
Usually a page will show for multiple page flips while reading. So turning the page 3-6x, depending on the size font used, can show the same page number. The current book I'm reading though changes the page number for each and every page flip that I do. This of course drastically inflates the total page number count to 1112 (when Amazon for instance shows 396 pages, which is correct). I can't find anything within the epub that would be setting a different number of characters to denote pages. So how exactly is it showing a new page for each page turn? |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,724
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Nope. It's based on the compression and 1024 characters. So the only thing you have control over is the amount of compressions which will change the page numbering.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,758
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Hi,
Inside an epub that uses real page numbers you will find either one of two things: 1. a page-map.xml file that lists the id target anchor for the start of the real page in the matching printed book. Or 2. a set of pagelist entries that are added to the toc.ncx file that serves the exact same thing just using a slightly different format. So epubs can set and use real page numbers but the ebook author must take the time to put < a id="pageXXX" > < / a > tag inline just before the first word of page XXX and then create either a page-map.xml or add the pageList to the toc.ncx that point to each one. This is rarely done and so ebook readers will often use a set number of characters and simply call it a "page" but these have no relation to the original printed version. Simply Google page-map.xml or pageList and epub and read up on it. Hope this helps, KevinH Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
You can also read the wiki here about how different formats/devices handle generating "page numbers":
https://wiki.mobileread.com/wiki/Page_numbers and read more details on the page-map.xml file here: https://wiki.mobileread.com/wiki/Adob...tions#Page-map |
![]() |
![]() |
![]() |
#5 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Shortly, the number of pages in each "chapter" is calculated by dividing the total compressed size of the file by 1024. Then the pages are distributed more or less evenly (I don't remember if the whole code or only the displayed text is used for this part).
Thus, the number of pages can be changed, without changing the text at all, by changing the compression level, or by adding or removing invisible code (HTML comments, non-displayed elements, long or short class names, unnecessary tags, inline styles, <meta> tags in the HTML head, whitespace, etc.) This is valid for generated page numbers in Adobe style. As mentioned, there are other methods to include explicit page numbers. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
I don't see anything in the html files that any of the above posts mentions, and there's definitely not a page-map.xml file included. There is a LOT of unnecessary <span blah blah> coding where it's apparent they used some crappy generator or converter and didn't spend much time proof-reading, let alone cleaning up the code. But the total file size is still only 560kb.
I would upload the book for anyone to tell me what I'm missing, but it's a purchased book, so copy-righted, etc. How can one change the compression used to make such a change? I've opened the book in Sigil and resaved normally, I've used Calibre to convert epub to epub, and it still has the inflated page numbering. I would think if some special compression was used, that those steps would have at least changed it to what I commonly transfer to my readers. Edit: Just in case anyone else maybe has the book, it's "Ghost Light" by Rick Hautala that I purchased from Smashwords. Last edited by Ripplinger; 07-24-2014 at 09:10 PM. |
![]() |
![]() |
![]() |
#7 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
If your reader uses the ADE engine to render the book, then the page numbers will be the same as any other reader using ADE. What reader are you using? |
|
![]() |
![]() |
![]() |
#8 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
Two readers, the Kobo Glo and the Sony 350, both of which show 1112 pages for the book. And I'm positive I didn't read through over 1000 normal pages.
|
![]() |
![]() |
![]() |
#9 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Since they show the same numbering they are both using ADE. There is nothing you can do. Possibly there may be settings in the reading software to control some aspect of the numbering but I doubt it.
|
![]() |
![]() |
![]() |
#10 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,724
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What book is this? What is the word count (using the count pages plugin)?
|
![]() |
![]() |
![]() |
#11 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
The book is "Ghost Light" by Rick Hautala that I purchased from Smashwords. The Count Pages plugin in Calibre shows the book as 489 pages, 148,487 words.
|
![]() |
![]() |
![]() |
#12 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I guess the only thing you can do is cleaning up the code, but that's time-consuming. Otherwise, you can just ignore the page numbers.
|
![]() |
![]() |
![]() |
#13 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,724
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
One easy way to clean up the code is to remove the junk such as <p class="indent"> and replace it with <p> and make sure <p> is defined properly in the CSS. However, you will then have to (most likely) add a text-indent of 0 to to the classes that use a center or are made for a nonindent.
|
![]() |
![]() |
![]() |
#14 |
350 Hoarder
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
I might give that a try at some point just to see if it does anything to the page numbering, but the code in the book is a mess like I said, apparently from some auto-generated software, I'm guessing OCR'd since the book was originally published in 1993 and by someone who didn't proofread much at all and who left the code mess as it originally was generated. It won't be a quick and easy job since there are so many unnecessary and different span entries.
|
![]() |
![]() |
![]() |
#15 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,724
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
pdf (with page numbers) to epub | crill | Workshop | 13 | 01-12-2019 09:13 AM |
Aura Page numbers in ePub? | rxmom03 | Kobo Reader | 2 | 09-29-2013 02:19 PM |
continuous page numbers in Epub | pcskibum | Conversion | 9 | 03-07-2012 09:42 AM |
Epub to Kindle and page numbers | apropos | Calibre | 11 | 12-09-2010 01:42 PM |
page numbers messed up in my epub | verybadcat | ePub | 1 | 04-13-2010 04:47 PM |