Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-23-2014, 08:05 PM   #1
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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?
Ripplinger is offline   Reply With Quote
Old 07-23-2014, 08:08 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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.
JSWolf is offline   Reply With Quote
Advert
Old 07-23-2014, 11:39 PM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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:
Originally Posted by Ripplinger View Post
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?
KevinH is online now   Reply With Quote
Old 07-24-2014, 02:14 AM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
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
Tex2002ans is offline   Reply With Quote
Old 07-24-2014, 04:56 AM   #5
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,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.
Jellby is offline   Reply With Quote
Advert
Old 07-24-2014, 09:07 PM   #6
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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.
Ripplinger is offline   Reply With Quote
Old 07-24-2014, 09:37 PM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Ripplinger View Post
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.
There is no standard page numbering in the epub spec. Most likely there is nothing you can do to change the page numbering you are seeing. Each reader assigns numbers as it sees fit.

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?
DoctorOhh is offline   Reply With Quote
Old 07-24-2014, 09:47 PM   #8
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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.
Ripplinger is offline   Reply With Quote
Old 07-24-2014, 09:51 PM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
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.
DoctorOhh is offline   Reply With Quote
Old 07-24-2014, 11:12 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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)?
JSWolf is offline   Reply With Quote
Old 07-24-2014, 11:46 PM   #11
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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.
Ripplinger is offline   Reply With Quote
Old 07-25-2014, 04:56 AM   #12
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,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.
Jellby is offline   Reply With Quote
Old 07-25-2014, 08:49 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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.
JSWolf is offline   Reply With Quote
Old 07-25-2014, 01:32 PM   #14
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
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.
Ripplinger is offline   Reply With Quote
Old 07-25-2014, 09:59 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by Ripplinger View Post
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.
I have a perfect solution to those unnecessary spans. Search/replace the spans into just a plain <span> and then use the Rev. Bob forked version of Modify ePub to remove empty spans and they will just go away. Easy to dump all those spans.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 10:25 PM.


MobileRead.com is a privately owned, operated and funded community.