wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats. These run entirely “headless” and do not require a display or display service.
Both tools can be easily used on Hypernode by downloading the pre-compiled package from their website.

Download wkhtmltopdf

You can download wkhtmltopdf from their website. Choose the Linux 64 bit version and download the tar file:

Then unpack it in your homedir:

Use wkhtmltopdf

You can run wkhtmltopdf and wkhtmltoimage by changing your PATH settings.

To do this, add the following settings to your PATH and .bashrc:

You can now use wkhtmltopdf and wkhtmltoimage from the commandline.

Recommendations

  • If you use wkhtmltopdf or wkhtmltoimage inside your application or an extension, refer to the manual or ask the extension maintainer for help with the implementation of your extension.
  • The documentation of wkhtml is very minimal. If you run into bugs or issues regarding this tool, you can file an issue on their github page
00