HTML2PDF table of contents generation

Q. The HTML2PDF sample project provides an option to add ‘Table of Contents’ for the documents. Is this logic based on some algorithms/Page Fonts/ ….or something else?
Can you please provide some details on the logic for defining the Table of Contents for the document?

A. The table of contents is simply based on the H tags in the html source.
You can use HTML2PDF::DumpOutline(xml_output_file) to see what HTML2PDF is going to use.
Additionally, you can override this for each url, by using HTML2PDF::WebPageSettings::SetIncludeInOutline(bool). See example 3 in the HTML2PDF sample.