Convert a html book to a pdf file

htmlpdf

How can I convert a html book (consisting of a number of html files linked to each other) to a pdf file on Ubuntu?

Hope the resulting pdf file can have bookmarks according to the structures of the html book.

The html book can be downloaded from here. Extract it, and go to help, and the directory manual is the html book.

Best Answer

First off, not sure I can get the bookmarks and such made automatically, as nice as that would be.

You can manually add them, though, afterwards.

Try opening the HTML file in firefox, and going to file -> print (ctrl+p). Then, click "Print to File" and click 'PDF'. Then type your file name and select the folder to save it in.

enter image description here

If you want to automate it, maybe you want wkhtmltopdf? To install it (in ubuntu or debian or linuxmint or similar), type:
sudo apt-get install wkhtmltopdf

Related Question