Quote:
Originally Posted by jist
I know and understand that pdf is a problematic format for conversion.
I am not complaining that the page count plugin is not able to count all pdf's.
(for me it does well on the majority of them though)
This is about (not) notifying the user, and (not) ending a process that keeps running in a hidden fashion even after ending the plugin or restarting Calibre.
edit:
A new thought came up:
While I can imagine that counting words from a pdf can be problematic and process-freezing sometimes, I am guessing that counting the pages usually won't pose serious problems.
So maybe when counting words 'gets stuck', propose to only write the page count and terminate word count?
|
The issue is defining "gets stuck". If a PDF with one word on one page takes hours to count, it is reasonable to think something went wrong. But for a 100MB file, how do you know? It could just be taking a very long time and will work in a number of hours. Or it could have hung.
Separating the page and word count for PDF might make sense. I have to check the code. I don't know exactly how they work. The page count might come from a metadata attribute of some sort. If so, it might be possible to run them as separate jobs. That way you would get the page count even if you didn't get the word count. But, I'm honestly not sure if it is worth the hassle. How often does it actually fail.
For killing the job, I think it is out of my hands. Calibre is doing that and I don't know if the plugin gets a chance to kill and sub-processes. I'll look when I have a chance.
And for the record, I didn't create the plugin. The kiwidude is the one to congratulate for that. And a pile of other excellent plugins.