wkhtmltopdf displaying text as blocks

We're using wkhtmltopdf in a web project (nodejs/compoundjs). We've gotten it working how we wanted on our machines (using the --use-xserver switch). However, when I try to run this on our Ubuntu server 12.04 (without the ubuntu-desktop package), the PDF cannot use the switch. When we disable the switch, the PDF displays any characters as blocks (image below).

How do I resolve this without installing ubuntu-desktop and running x server?

I've found liberation fonts, which installing ttf-liberation and fonts-liberation did not help. And urw-fonts, but I have yet to find an Ubuntu equivalent.

PDF Output

EDIT: It just hit me, this doesn't matter if I'm on the server or not. On my development machine (Ubuntu 13.04 desktop), I can run the following, which produces the same blocks:

wkhtmltopdf http://google.com google1.pdf

While this prints out the pdf properly:

wkhtmltopdf --use-xserver http://google.com google2.pdf

My version of wkhtmltopdf is 0.12.0.


Solution 1:

In fact wkhtmltopdf on linux requires quite a lot of Xorg as mentioned on the project page:

(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)

You should install the client libs as well.