It can be convenient to convert HTML files to PDF for better portability and compatibility. For Windows, a free offline tool that can do this is Weeny Free HTML to PDF Converter.
It can also convert XML and text files to PDF and supports batch conversion.
Download and install it from here.
After it is installed, launch it. The interface will have two options for accepting the source files: through a URL and through adding the saved HTML files.
The URL option is an easy way to directly convert a webpage to PDF and save it, similar to the htmldoc utility in Linux.
Using files:
To add saved HTML files, click on the Add Files button and add them. Multiple files too can be added.
The default folder where the converted PDF files are generated is the My PDF folder. Also, by default, this folder will be opened every time after the conversion. The other actions available are doing nothing and showing a message.
When all the source HTML files are added, click on the Convert Now button. After these files are converted, the output folder will show them as PDFs.
Using URLs:
To convert URLs into PDFs, click on the Add URL button. Then copy-paste it.
As with files, multiple URLs also can be added, and they will be batch processed. Click on OK after the required URLs are added and hit the Convert Now button.
The converted PDF file from the contents of the added URLs(including images) will be available in the output folder.
Overall, it is a useful, lightweight, and free offline tool that can quickly convert HTML, text, and XML files to PDF documents.
All done.