wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webkit rendering engine. These run entirely "headless" and do not require a display or display service.
This version does not require Internet to work.
Requires:
sudo apt-get install libqt5webkit5-dev
sudo apt-get install libqt5svg5-dev
See http://wkhtmltopdf.org for updated documentation.