Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-23-2025, 08:44 PM   #1
epubmystery
Junior Member
epubmystery began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2025
Device: Kindle Paperwhite (10th Gen)
Page number mapping in EPUBs?

I recently sent an EPUB from Calibre to my Kindle via email, and the book had page number support out of the box (both on the Kindle, and on the app on Android). It wasn't something that Calibre did; I verified by uploading to Kindle straight from my phone, and the page numbers were still there.

However, I'm not seeing this with every EPUB. I've compared 2 EPUBS (one which had out of the box page number support and which doesn't) and I've been unable to figure out what exactly it is in the EPUB that provides this support. I've compared the `toc.ncx` and `content.opf` files, but haven't seen anything that would indicate page numbers. Any ideas?

Happy to upload both EPUBs here, but not sure what the forum rules are around that.
epubmystery is offline   Reply With Quote
Old 04-23-2025, 09:02 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Did the ones with page counts have a "page-map" file in the ePub??
Turtle91 is offline   Reply With Quote
Old 04-24-2025, 12:55 AM   #3
epubmystery
Junior Member
epubmystery began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2025
Device: Kindle Paperwhite (10th Gen)
Quote:
Originally Posted by Turtle91 View Post
Did the ones with page counts have a "page-map" file in the ePub??
Nope, no "page-map" files either. The only thing I've seen is `<div class="mbppagebreak" id="calibre_pb_4"></div>` on the content files. But these content files are split by chapter, so it doesn't seem like this would say anything about page numbers.
epubmystery is offline   Reply With Quote
Old 04-24-2025, 06:35 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I would suggest using a “Borkify” plugin to scramble the words of the ePubs, then post it here. I know Sigil has that plugin and I’m 98.7% sure Calibre does too. That way we can take a look under the hood.
Turtle91 is offline   Reply With Quote
Old 04-24-2025, 07:15 AM   #5
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,763
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 Turtle91 View Post
I would suggest using a “Borkify” plugin to scramble the words of the ePubs, then post it here. I know Sigil has that plugin and I’m 98.7% sure Calibre does too. That way we can take a look under the hood.
The calibre plugin to scramble eBooks is ScrambleEbook.
JSWolf is offline   Reply With Quote
Old 04-27-2025, 08:42 AM   #6
epubmystery
Junior Member
epubmystery began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2025
Device: Kindle Paperwhite (10th Gen)
Apologies for the delay, and thank you for the replies! I've used ScrambleEbook, hopefully there's something in the EPUBs that can point us in the right direction.

Can't upload stuff directly here, so you can find the scrambled EPUBs here: https://limewire.com/d/mAlQW#QJXYwWnRQ3

Thanks!
epubmystery is offline   Reply With Quote
Old 04-27-2025, 12:36 PM   #7
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,769
Karma: 6000000
Join Date: Nov 2009
Device: many
These are both epub2 epubs with no page maps and no page section in the ncx.

There are no real page numbers indexed in either book. There are calibre mpagebreaks in at least one of them. So if they were based on real page numbers in a valid printed edition then you could create a real page map if you so desired.

But I think you are confusing real page numbering maps with e-reader/calibre generated fake page numbers. Many e-readers, calibre included, can generate "pages" based on fixed word or letter counts to help people see reading progress but that are not at all related to real page numbers in a published edition of the book.

I thought you somehow had either an ADE pagemap.xml, or an ncx page section or a nav pagelist (if it was an epub3) that specifies the exact page breaks that match a specific published printed edition. These are actually used for academic citations. But rare in general fiction.
KevinH is offline   Reply With Quote
Old 04-28-2025, 07:00 AM   #8
epubmystery
Junior Member
epubmystery began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2025
Device: Kindle Paperwhite (10th Gen)
Quote:
Many e-readers, calibre included, can generate "pages" based on fixed word or letter counts to help people see reading progress but that are not at all related to real page numbers in a published edition of the book.
Thanks for taking a look!

So it sounds like the Kindle is somehow generating these "page" numbers. I've never seen that before, but it would make sense.

I'm not sure how to investigate the conversion between the EPUB and KFX so I guess that's that. It would be nice to figure out what exactly tells the Kindle to generate page numbers for one EPUB but not the other.
epubmystery is offline   Reply With Quote
Old 04-28-2025, 08:17 AM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I don’t play with Kindle much, but other apps have options that can be set for each book, not just the entire app???
Turtle91 is offline   Reply With Quote
Old 04-28-2025, 12:18 PM   #10
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,769
Karma: 6000000
Join Date: Nov 2009
Device: many
Fwiw, Kindles used to keep their page maps as separate files (.apnx) that is not part of the epub.

KindleUnpack has the ability to create an adobe pagemap.xml file from a separate apnx file associated with kindle files in .kf8 format.

I have no idea how the KFX file format stores page numbers. Perhaps jhowell knows. He created the kfx to epub output converter that calibre uses.
KevinH is offline   Reply With Quote
Old 04-28-2025, 02:49 PM   #11
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,073
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by KevinH View Post
I have no idea how the KFX file format stores page numbers. Perhaps jhowell knows. He created the kfx to epub output converter that calibre uses.
In KFX format page numbers are stored internally as part of the book navigation data along with the table of contents and guide data, instead of in a separate file.

Quote:
Originally Posted by epubmystery View Post
Apologies for the delay, and thank you for the replies! I've used ScrambleEbook, hopefully there's something in the EPUBs that can point us in the right direction.
I used the send-to-kindle web page to send both of the "page numbers" and "no page numbers" book samples you provided and neither results in page numbers being present in the resulting book on my Kindle device. It is possible that whatever content makes page numbers appear for you may have been stripped out in the scrambling process.
jhowell is online now   Reply With Quote
Old 04-29-2025, 03:31 AM   #12
epubmystery
Junior Member
epubmystery began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2025
Device: Kindle Paperwhite (10th Gen)
Quote:
I used the send-to-kindle web page to send both of the "page numbers" and "no page numbers" book samples you provided and neither results in page numbers being present in the resulting book on my Kindle device.
Interesting. I just double checked, and I was able to get page numbers working by both:

1. using the send-to-kindle web page, and
2. uploading to the kindle app from my android phone (you can do this by downloading the epub and "sharing" with the kindle app)

I confirmed that page numbers show up both on the Kindle device and the Kindle app on Android. I wonder if I'm in some A/B test by Amazon
epubmystery is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tts page autoturn only works if built-in page number turns off for 1 page txt file CrazyGriferman PocketBook 0 10-22-2024 02:50 PM
Mapping back button to 'next page' function in reader jonnyl KOReader 3 03-06-2022 07:08 AM
Group ePubs How to Number LostOnTheLine Library Management 4 08-07-2021 01:20 AM
Make page 1 the last page number for pages left in a chapter #7549 JSWolf KOReader 8 05-29-2021 03:30 AM
Page Mapping Using toc.ncx lorddon ePub 35 01-16-2018 12:18 PM


All times are GMT -4. The time now is 11:24 AM.


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