Quote:
Originally Posted by kamowski
Hello,
I mainly use PDF documents in Calibre. I need a plugin that checks a PDF document and marks, in a separate column, whether the document contains a TOC or not.
I have a script that detects the presence of a TOC in a PDF document, but I don't know how to turn it into a plugin. I'm not a programmer, and I created this script using AI.
Can anyone me create a plugin from it?
Thank you!
|
I am a programmer and this has been on my todo list for a number of years.
Too many projects right now to get to it, but here's my thoughts...
Calibre has an internal pdf library that it should be easy to leverage to do this.
Not all pdf files with a TOC actually have a TOC. Far more than I like have a "TOC" with a single entry in them, so knowing if it has a TOC is not enough, you need to check if it has more than some threshold number of entries. (Which is still trivial, but...)