View Single Post
Old 02-21-2012, 10:59 AM   #235
kiwidude
Calibre Plugins 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,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Kogs - a book having originally been in mobi and then converted to ePub vs a book that was always in ePub should not make a difference to the count? If you have a specific example where this is not the case, feel free to PM me some links to take a look.

The one possible explanation for what you are seeing is if you had your count pages preferences set to "Prefer mobi" rather than "Prefer ePub". So if after doing a mobi -> ePub conversion you ran the Count pages plugin, you would still be seeing a count derived from the mobi, not from the ePub.

And (as I have said previously) the algorithm within calibre for computing mobi page counts (that this plugin calls) does not work very consistently because it gets fooled by books using <blockquote> or <div> tags for paragraphs. Converting mobi->ePub alone will not change that. However if you have "Prefer ePub" set, then this plugin will not use the calibre page count code and will instead use my own ePub page counting logic which caters for those conditions.

For the next version of this plugin I will add a modified version of the calibre logic to cope with blockquote/div.I will also drop the "Prefer epub/mobi" setting, which was a partial workaround required for consistency with the APNX generation (i.e. what actually ends up on your Kindle). That is no longer needed because a user can now specify a custom column as the page count source, rather than using calibre's mobi page count which has the issues above. So at least that way a plugin user will get consistent counts regardless of which of the two formats was computed against.

The final piece of the puzzle for some users is the standalone APNX file generator plugin, for users not using Send to Device. SauliusP posted in the Development forum his intent to update that to also support a custom column. In some ways it might make sense instead (or also) to simply add a menu option within this one to offer the same features, removing the need for an extra plugin. As even using a custom column as the source, you still need to populate it, which is what this plugin does.
kiwidude is offline   Reply With Quote