Changes in this release:
- Offer choice of algorithms to match eBook viewer or APNX generation (default)
- Ensure DRM encrypted books do not cause errors
I decided to give people a choice of algorithms - the default remains the same of as per the last release to use the APNX line count based one. However should you wish you can instead use the Adobe based one that the Calibre ebook viewer uses - the numbers will likely be a lot higher but then people who actually read their books using the Calibre viewer might prefer that.
I contemplated adding a third algorithm, based on stripping all the HTML comment. I tried a few variants, such as lines based or just dividing by a number of characters per page. I think it gave a little more consistent results but not significantly different in most cases from the Adobe based one. Of course you can change the number of characters per "page" to bring the numbers down closer to reality/the APNX based one, but it is all just fudging numbers so I ripped it out.
If someone comes up with an algorithm that they and others agree would offer more consistent results then it can always be added.