wkhtmltopdf displaying text as blocks
        Posted  
        
            by 
                making3
            
        on Ask Ubuntu
        
        See other posts from Ask Ubuntu
        
            or by making3
        
        
        
        Published on 2013-10-23T18:56:41Z
        Indexed on 
            2013/11/08
            22:16 UTC
        
        
        Read the original article
        Hit count: 320
        
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.
© Ask Ubuntu or respective owner