Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-31-2013, 07:28 PM   #16
mattcurtis
Book Lover, Dev of Hyphen
mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.
 
mattcurtis's Avatar
 
Posts: 59
Karma: 2013886
Join Date: Apr 2013
Device: iPhone (Hyphen)
Quote:
Originally Posted by PeterT View Post
ADE page numbers are constant, regardless of things like font sizes / screen size etc. Roughly speaking, as others have said, they are based on a 1024 character chunk of the text; each 1k is a page.
Here's what confuses me about that: how does that account for paragraph margin, font-size, etc? I mean, if the font size is large enough, how will the pages number ever map correctly to what the user is seeing? Or do page numbers account for swathes of text? I can't seem to find information that explains it thoroughly, or at least has code that implements it.
mattcurtis is offline   Reply With Quote
Old 05-31-2013, 07:37 PM   #17
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,792
Karma: 146391129
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 mattcurtis View Post
Here's what confuses me about that: how does that account for paragraph margin, font-size, etc? I mean, if the font size is large enough, how will the pages number ever map correctly to what the user is seeing? Or do page numbers account for swathes of text? I can't seem to find information that explains it thoroughly, or at least has code that implements it.
I've already told you that the Count Pages Calibre plug-in has the code to do the ADE page count. You groaned that it's in Python. Did you forget that fast? You can look there and see how it's calculated.

ADE's method of pages uses a count of the text in the XML files. It does not matter what the CSS tells the XML how to display or what the user has set the font size to. The XML is a set file. Nothing the CSS does changes that. How it displays does not change the size of the file.
JSWolf is offline   Reply With Quote
Advert
Old 05-31-2013, 08:27 PM   #18
mattcurtis
Book Lover, Dev of Hyphen
mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.
 
mattcurtis's Avatar
 
Posts: 59
Karma: 2013886
Join Date: Apr 2013
Device: iPhone (Hyphen)
Quote:
Originally Posted by JSWolf View Post
I've already told you that the Count Pages Calibre plug-in has the code to do the ADE page count. You groaned that it's in Python. Did you forget that fast? You can look there and see how it's calculated.

ADE's method of pages uses a count of the text in the XML files. It does not matter what the CSS tells the XML how to display or what the user has set the font size to. The XML is a set file. Nothing the CSS does changes that. How it displays does not change the size of the file.
I'm still looking at its code, actually - it's been helpful, even though my Python sucks. I was asking for more information about the methodology so I can understand how to translate that into code that code into Obj-C/JavaScript (what I'm working with).

Secondly, if I'm not working with a compressed ePub, but an extracted one, does the same 1024 bytes apply?

Last edited by mattcurtis; 05-31-2013 at 09:25 PM.
mattcurtis is offline   Reply With Quote
Old 05-31-2013, 09:28 PM   #19
mattcurtis
Book Lover, Dev of Hyphen
mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.
 
mattcurtis's Avatar
 
Posts: 59
Karma: 2013886
Join Date: Apr 2013
Device: iPhone (Hyphen)
Finally found something that explains this in detail: http://bookclubs.barnesandnoble.com/...ng/td-p/691602

I think it's starting to map itself together in my head (my code, at least) I'm not as confused anymore. Thanks for the help.
mattcurtis is offline   Reply With Quote
Old 05-31-2013, 09:41 PM   #20
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,792
Karma: 146391129
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 mattcurtis View Post
Secondly, if I'm not working with a compressed ePub, but an extracted one, does the same 1024 bytes apply?
There is no such thing as an extracted ePub. ePub is a ZIP container. So you work with the ePub as it is for the page count. You don't count things like images, CSS, OPF, etc. You only count the files in the spine in the OPF. You count the compressed bytes to get 1024 and then whatever that becomes when uncompressed to is your page.
JSWolf is offline   Reply With Quote
Advert
Old 06-01-2013, 03:06 AM   #21
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,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by PeterT View Post
Actually I wold have thought that with the ADE style of page numbering, no degree of changes to the CSS would affect the page number. After all that is the whole idea behind the synthetic numbering.
Not if the CSS is in a separate file, but every change in the HTML files can change the page numbering, including simply adding spaces or comments in the code. Even changing the zip compression level does change the page numbering!
Jellby is offline   Reply With Quote
Old 06-01-2013, 03:12 AM   #22
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,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by mattcurtis View Post
Finally found something that explains this in detail: http://bookclubs.barnesandnoble.com/...ng/td-p/691602.
There is a slight disagreement there. That page says:

"The first page will be 1212 characters long, and the second will be 1213 long."

While our wiki (which was copied from what Adobe once had online, I believe), says:

"... round the number of characters per page up and let the last “page” contain less characters than the rest."
which would mean that the first page is 1213 characters and the second 1212.

Last edited by Jellby; 06-01-2013 at 02:05 PM. Reason: I meant 1213, of course
Jellby is offline   Reply With Quote
Old 06-01-2013, 10:48 AM   #23
mattcurtis
Book Lover, Dev of Hyphen
mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.mattcurtis ought to be getting tired of karma fortunes by now.
 
mattcurtis's Avatar
 
Posts: 59
Karma: 2013886
Join Date: Apr 2013
Device: iPhone (Hyphen)
Quote:
Originally Posted by Jellby View Post
There is a slight disagreement there. That page says:

"The first page will be 1212 characters long, and the second will be 1213 long."

While our wiki (which was copied from what Adobe once had online, I believe), says:

"... round the number of characters per page up and let the last “page” contain less characters than the rest."
which would mean that the first page is 1212 characters and the second 1212.
That's what I thought, thanks. I'm not sure why my puddy-brain wasn't getting ADE pages.
mattcurtis is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iPad ePub, CSS : Bug with 'position:relative' property ? Ereskelios Apple Devices 3 09-29-2014 07:53 AM
iPhone ePub won't scroll page-to-page JohnnyAppleScrip Apple Devices 1 02-15-2012 02:31 PM
epub to mobi h1 page breaks not starting on new page wannabee Conversion 4 08-02-2011 12:46 AM
PB360, Position im Buch (CRM EPUB) wird nicht gespeichert bigfellow PocketBook 1 07-17-2010 04:13 PM
ePub not supported < div > position: absolute samsgates ePub 1 06-18-2010 11:22 AM


All times are GMT -4. The time now is 02:34 PM.


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