I use https://github.com/Krasjet/pdf.tocgen.
It's not quite fully automatic, but it certainly saves a lot of time over doing it completely by hand.
It's not quite fully automatic, but it certainly saves a lot of time over doing it completely by hand.