Creating table of contents/hyperlinks/index to pages within a pdf
I'm creating a PDF by merging multiple PDFs and I'd like to have an index within the merged PDF that links to every second PDF file used to create the merged PDF, as they are header files. I have seen some code to make hyperlinked table of contents that when clicked will go to a specific page, but I haven't been able to get it working, can someone explain the basic lines of code to use to add items to a table of contents within the merged PDF as I am merging it? The text in the table of contents should just be the filenames on the PDFs that are being merged. I'm using C#.