Frequently Asked Question:
Generate a dynamic table of contents
Can Quick PDF Library generate a dynamic table of contents?
Quick PDF Library provides you with all of the necessary tools required to build a dynamic table of contents, but it doesn't include a specific function for this task. Instead you'd have to use a variety of different functions to programmatically complete this task -- depending on where you wished to grab the information for the table of contents.
For example, if you wanted to create a table of contents based on font styles (font type, size, color, etc) and co-ordinates, then this would be possible as you can use functions such as GetPageText to retrieve all of the required information from the document.
Or if you wanted to generate a table of contents based on the bookmarks in the PDF document, then this would also be possible using the extensive range of PDF bookmark related functions that our PDF SDK includes.
Then, once you had the data for the table of contents, you could use the DrawText function to write the table of contents. The AddLinkToPage function can also be used to make the table of contents interactive.