Running wkhtmltopdf in Vagrant (without X server)

Chances are you might need to run wkhtmltopdf on your server or in Vagrant environment (e.g. to overcome compatibility issue such as Cannot mix incompatible Qt library (version 0x50700) with this library (version 0x50701)). That way you need to be able to run it without an actual X server.

Solution is luckily pretty simple. You can fake your X server with xvfb which is virtual framebuffer X server. On Fedora that comes as xorg-x11-server-Xvfb package:

Afterwards you can prepend your actual command with xvfb-run:

Leave a comment

Your email address will not be published. Required fields are marked *