The Debian repository package doesn’t come with patched version of Qt, so in order to use wkhtmltox you need to install the package manually.
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
$ tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
$ cp wkhtmltox/bin/wk* /usr/local/bin/
Reference
- https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2037
- https://unix.stackexchange.com/questions/192642/wkhtmltopdf-qxcbconnection-could-not-connect-to-display
- https://github.com/JazzCore/python-pdfkit/issues/82
- https://gist.github.com/isogram/1b39fa91f34e35e66c84fe066cc37577
- https://github.com/JazzCore/python-pdfkit/blob/master/travis/before-script.sh