wkhtmltopdf displaying text as blocks
- by making3
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.
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.