I've got this big problem: I have a PDF book with, say, 4 chapters and a bunch of paragraphs in each chapters. At the begenning of the book there is a non-clickable index with chapters, paragraphs and page numbers.

I need to create a bookmark for each paragraph but since I've been messing around with quite some books that have 10 (or more) chapters each, with plenty of paragraphs per chapter, it would take me a loooot of time to manually create the bookmarks.

Is there a way to automatically create bookmarks from the book index?

Thank in advance

1 Answer 1


Try using pyPdf library.

And use the parser above the ToC extracted area (your non-clickable index with chapters). If it's text.

If it's vector shapes that look like letters but do not have the information that they are letters. Then you must still use OCR to convert it to editable text.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.