In search for a pdf index generator


I know this sounds a bit stupid, but I got a pdf with about 500 pages, for which I want to have a list of each title and it’s page number(with consecutive pages not mentioned n-times) and a keyword dictionary.

Do you have an idea on how to genearte something like that? Because doing it by hand is a very long process.

Thank you for your suggestions in advance.

Perhaps pdftk