so yeah creating a first table of contents page itself isn’t difficult, just add your own XML into the pdfset at the start. the difficult part would be parsing the info you need from your existing PDFs - that would likely require a 3rd party library to try to parse the pdf into text that you can process, and parsing PDFs can be difficult (eg if it reads the 8 as a 9 because of fonts, you won’t know until it’s already printed).