Is there some program which can convert a html ebook (consisting of many html files located under different directories and linked to each other) to a pdf file? For example, some shell scripting (e.g. in bash) which calls some program that does the conversion?
Additionally, if possible, can the resulting pdf file have outlines/bookmarks for clicking and jumping, according to the structures of the html book?
An example of a html ebook can be downloaded from http://en.cppreference.com/w/Cppreference:Archives. Extract it, and there are several levels of subdirectories. At the root level, there is a file cppreference-doxygen-local.tag.xml
which seems to list all the html files, and might be helpful for convertion to a pdf file.
Thanks.