Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 06-04-2023, 01:35 AM   #1
John IV
Member
John IV began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2022
Device: Kindle Scribe
The viewer's calculation of number of pages in a book?

I've been interested lately in figuring out how my ebooks' Kindle 'locations' would map to a number of physical pages in say a mass market paperback.

The location number doesn't change regardless of margin/font tweak etc. So there seems to be a few 'rough' ways to do it.

For example, location x 23 to get total number of words, then divide by mass market paperback words per page so like 300.

Anyhow, I noticed the other day that the Calibre e-book viewer can display the location in the book and (total?) pages in the footer in the lower right and it appears to be analogous to page number. Do we know how this is calculated?
John IV is offline   Reply With Quote
Old 06-04-2023, 02:10 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The viewer is open source, you can read the code and see for yourself. IIRC it strips html tags takes a word count and divides by a fixed number of words per page.
kovidgoyal is offline   Reply With Quote
Advert
Old 06-04-2023, 03:58 PM   #3
John IV
Member
John IV began at the beginning.
 
Posts: 22
Karma: 10
Join Date: May 2022
Device: Kindle Scribe
Thanks Kovid, I'm not a programmer but I was looking on GitHub to see if I could spy where the viewer's code lived, but wasn't seeing it.
John IV is offline   Reply With Quote
Reply

Tags
page numbering


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Number of pages in a book albare Kobo Reader 14 01-28-2022 09:42 PM
Show number of pages in book - where? manawydan Viewer 2 08-06-2020 12:43 PM
Page number in e-book viewer Jim67 Calibre 2 01-29-2020 11:56 AM
How does the calibre viewer calculate page number and total pages? auspex Development 9 09-24-2014 08:10 AM
Do the number of pages in an ebook differ from the number of pages in a physical book Phoebemy General Discussions 12 07-19-2012 09:25 AM


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


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