weasyprint
weasyprint is a gratis and open-source Python package which comes with an executable. Documentation is online, code is on Github. Last commit was on 19.09.2017. It has 1484 stars, 155 forks and 41 contributors.
Installation
$ pip install weasyprint
Usage
$ weasyprint input.html output.pdf
Example 1
Please note:
- The page is in landscape mode ✓
- The font is changed for Country ✓
- Code is not red ✘ (see this question)✓
- Phone is red ✓
- The table is striped ✓ (not striped in the example due to a bootstrap print setting)
- JavaScript does not work ✘