Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-31-2012, 06:18 AM   #316
blekm
Junior Member
blekm began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2012
Device: Kindle 4
Quote:
Originally Posted by kiwidude View Post
@blekm - see the "Special Notes" in the first post of this thread for how to make sure apnx files are being generated and if they are to get the count from your special pages column. If the apnx files aren't shwoing up on your Kindle or your Kindle isn't dealing with them that is absolutely nothing to do with this plugin. This plugin only updates a custom column in calibre, nothing more, nothing less.
sorry, I thought I did something else
blekm is offline   Reply With Quote
Old 05-31-2012, 06:31 AM   #317
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@blekm - nope, that is all it does. And it was a relatively recent enhancement to integrate with calibre's apnx generation feature so that rather than using calibre's own algorithm for determining pages (which is not as robust as the one in this plugin) it could instead pull the value from a custom column, which you may have populated using this plugin, or may have set manually, it doesn't care.

So once you have configured a custom column, given it a value (manually or using this plugin), configured the Kindle plugin as per the special notes, and then used Send to Device to put the book on your Kindle, you should find a .apnx file on your Kindle in the same folder as the book, and that is what the kindle uses to display page counts.

If you are not using Send to Device and just drag/dropping mobi files, or you have disabled the apnx generation on the Kindle plugin in calibre, then you won't get page counts. That is all I can suggest, otherwise post in the calibre device subforum, because as I say this plugin really has nothing to do with displaying page counts on a Kindle or indeed any other device.
kiwidude is offline   Reply With Quote
Old 05-31-2012, 06:47 AM   #318
MikeOxlittle
Say my name very fast ...
MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.MikeOxlittle ought to be getting tired of karma fortunes by now.
 
MikeOxlittle's Avatar
 
Posts: 131
Karma: 1387009
Join Date: Apr 2011
Location: The High Seas
Device: Kindle
Fantastic work yet again kiwidude.

Just got the plugin all set up and everything works beautifully.

Transferred a few books to test and really enjoy having a page number to reference instead of just a location/percentage.

Cheers!
MikeOxlittle is offline   Reply With Quote
Old 05-31-2012, 10:56 AM   #319
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 105
Karma: 554
Join Date: Oct 2008
Device: none
After updating from v1.3.3 to v1.4.1, I noticed that the page numbers (counted using the "Calibre Viewer (Adobe)" algorithm) have changed significantly, e.g. from 710 pages to 340 pages (counted from the same book which contains only epub format). The new page numbers are also different from the numbers shown in Calibre Viewer, so I decided to reinstall v1.3.3. Is this a bug or a permanent effect?
atjnjk is offline   Reply With Quote
Old 05-31-2012, 12:06 PM   #320
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@atjnjk - in this release I made a performance optimisation which Kovid had suggested a while ago (his comment was a generalisation to do with using a particular part of calibre he had changed). I applied that to this plugin - but until you made the comment I stupidly didn't realise that using the optimisation directly affected the character counts.

I'll sort out a new version, but first I want to put in an optimisation for pdfs that will read the information directly from the pdf rather than trying to calculate it using any of the algorithms. A pdf is the only book format that truly does have a "page". I think it is desirable that in the situation of only having a pdf format available (and wanting to count pages in it) that this plugin avoids the potentially large performance penalty of converting to epub and estimating counts based on that, and gives you the *actual* page count instead.
kiwidude is offline   Reply With Quote
Old 05-31-2012, 12:56 PM   #321
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
v1.4.2 Released

Changes in this release:
  • Minimum version set to calibre 0.8.54
  • Optimisation for counting pages for PDFs to read the page count from the PDF info rather than estimating it
  • Revert the performance optimisation from 1.4.0 which affected the character count statistics
kiwidude is offline   Reply With Quote
Old 05-31-2012, 02:28 PM   #322
jgaiser
Omnivorous
jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.
 
jgaiser's Avatar
 
Posts: 3,049
Karma: 21118073
Join Date: Feb 2008
Location: Rural NW Oregon
Device: Kindle Fire HD, Kindle GDX, Kindle 3, KPW, Nook HD+
Quote:
Originally Posted by kiwidude View Post
@jgaiser - that epub you linked to counts as 210 pages, not 20 pages. Which means a variance between 244 and 210, which is completely expected.
Interesting. Just tried again. My setup counts 20 pages using Calibre Viewer algorithm and 244 pages with Paragraph algorithm. And... It seems to be the only ebook with that much varience. Very strange. Not a big deal really. I'll just stick with the Paragraph algorithm as I've been doing since the start.
jgaiser is offline   Reply With Quote
Old 06-01-2012, 05:30 PM   #323
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@jgaiser - is that using the very latest release above? As it comes out at 393 pages now with v1.4.2, which matches what the calibre viewer displays. I don't understand at all how/where you get 20 pages? If it doesn't happen with 1.4.2 we can write it off as something to do with me running for later source code or something...
kiwidude is offline   Reply With Quote
Old 06-01-2012, 05:42 PM   #324
Pierre Menard
Connoisseur
Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.Pierre Menard ought to be getting tired of karma fortunes by now.
 
Posts: 64
Karma: 326792
Join Date: Apr 2012
Device: Kobo Aura HD, Nook HD+, Nook Simple Touch
I appreciate this plugin. The APNX Accurate setting provides a reasonably good guideline for comparing different books when making a decision what I feel up to jumping into next.

One thing bothers me, though. The other setting beside APNX Accurate is "Calibre Viewer (Adobe)," suggesting that Calibre & Adobe are the same. In fact, the page counts given in Adobe Digital Editions are generally the best ones I've found--most closely related to the physical edition, and, more importantly, the same page counts I get in my Nook. These are the ones I'd ideally like to be able to generate. The Calibre page counts are completely different and basically useless.

Of course, I have no info to offer on how ADE actually figures those page counts...
Pierre Menard is offline   Reply With Quote
Old 06-01-2012, 07:29 PM   #325
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Pierre - it was my understanding that the calibre viewer used the Adobe algorithm. And this plugin just asks the same code the calibre viewer uses for exactly the same count. Hence that is why it says what it does...

I never use ADE, nor do I have a Nook. However I just opened an ePub in ADE, and I can see exactly what you mean - the calibre viewer is reporting it as 804 pages, yet ADE shows it as 334 pages, which as you say is the more "realistic" number.

A rough character count reveals just over 800,000 characters in this particular ePub (including spaces). Which using the 1024 character count algorithm plus all the "partial" page breaks comes out about what the ebook viewer says. Even chopping spaces out only takes this down to 650,000 which is still way more pages than Adobe is reporting, so that isn't the reason.

It has me intrigued now - time for some googling to see if anyone knows what magic ADE is using...
kiwidude is offline   Reply With Quote
Old 06-01-2012, 07:35 PM   #326
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Actually perhaps the answer is listed here:
http://blog.threepress.org/2009/11/2...-ncx-pagelist/
Quote:
Determine a compressed byte length of each resource which is referenced in the spine, subtracting any known encryption overhead (IV size)

Assume that there is a page for each 1024 bytes…
Perhaps that key word of "compressed" means something. Or maybe that is just a reference to a book having encryption. Maybe Kovid knows... I'll keep hunting...

Edit: I think I found the secret - by compressed they mean the compressed size in the epub zip file. So iterate through the spine, look at the compressed size in the zip and apply the 1024 calculation to that. I shall do some experimenting and see if it is indeed that simple - it would be very cool to get the numbers to properly match up.

Last edited by kiwidude; 06-01-2012 at 07:44 PM.
kiwidude is offline   Reply With Quote
Old 06-01-2012, 09:27 PM   #327
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Ok, good news, I've managed to nail it down and get this plugin returning an exact same ADE page count. The only question which I need Kovid to answer is whether he also wants to incorporate the change into calibre's ebook viewer algorithm (in which case my plugin should have the same two choices it displays today) or whether he wants to leave calibre as is (in which case my plugin will offer three choices).

I'm sure he will answer this fairly quickly in which case I can push the new pages algorithm tomorrow. @Pierre - thx for prompting me to look into this...
kiwidude is offline   Reply With Quote
Old 06-01-2012, 10:42 PM   #328
elemenoP
Wizard
elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.elemenoP ought to be getting tired of karma fortunes by now.
 
Posts: 1,716
Karma: 3790058
Join Date: Oct 2010
Location: NYC
Device: Kindle Paperwhite, Sony 650
Hi, I'm popping in here from another where I also pointed out that Calibre and ADE calculate the page counts very differently (and you pointed me here, thanks). It's great that you have figured out where the difference lies! If there is any place where we can add our voice to asking Kovid to make this same change in Calibre, please let me know, because I think that is the way to go.

eP
elemenoP is offline   Reply With Quote
Old 06-02-2012, 01:34 AM   #329
jgaiser
Omnivorous
jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.jgaiser ought to be getting tired of karma fortunes by now.
 
jgaiser's Avatar
 
Posts: 3,049
Karma: 21118073
Join Date: Feb 2008
Location: Rural NW Oregon
Device: Kindle Fire HD, Kindle GDX, Kindle 3, KPW, Nook HD+
Quote:
Originally Posted by kiwidude View Post
@jgaiser - is that using the very latest release above? As it comes out at 393 pages now with v1.4.2, which matches what the calibre viewer displays. I don't understand at all how/where you get 20 pages? If it doesn't happen with 1.4.2 we can write it off as something to do with me running for later source code or something...
Not running latest yet, as it needs latest calibre version and thanks to the joy of dialup I'm not going to be able to get it until later this weekend when I get into town and get to my favorite pub with free broadband wifi

I'll try again later this weekend.
jgaiser is offline   Reply With Quote
Old 06-02-2012, 04:04 AM   #330
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,112
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by elemenoP View Post
Hi, I'm popping in here from another where I also pointed out that Calibre and ADE calculate the page counts very differently (and you pointed me here, thanks). It's great that you have figured out where the difference lies! If there is any place where we can add our voice to asking Kovid to make this same change in Calibre, please let me know, because I think that is the way to go.
Not quite sure where in calibre you think this change should apply. As far as I know Calibre does not use the concept of page count that is being discussed here.
itimpi is offline   Reply With Quote
Reply

Tags
page count

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 797 12-16-2014 01:01 PM
[GUI Plugin] Open With kiwidude Plugins 251 12-15-2014 01:07 PM
[GUI Plugin] Quick Preferences kiwidude Plugins 32 09-13-2014 11:34 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 01:02 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 09:43 PM.


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