Using CSS3 @font-face with wkhtmltopdf on Centos5
Centos5 has an outdated version of libfontconfig which will cause this error if you try and reference a font:
wkhtmltopdf: symbol lookup error: wkhtmltopdf: undefined symbol: FcFreeTypeQueryFace
The issue was reported here with some useful instructions (actually it’s just a dependancy issue).
To fix, first you’ll need freetype-devel:
sudo yum install freetype-devel
Then following this advice, I did something like this:
wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.4.2.tar.gz tar -zxvf fontconfig-2.4.2.tar.gz cd fontconfig-2.4.2 ./configure -prefix=/usr make # I moved the file file into /usr/lib manually (don't trust 'make install' on a production box) sudo mv ./src/.libs/libfontconfig.so.1.2.0 /usr/lib/ # and setup the libfontconfig.so.1 symlink cd /usr/lib sudo ln -s libfontconfig.so.1.2.0 libfontconfig.so.1
Thanks to everyone for their awesome help…
I followed the instructions, however, after doing “make install” & then checking fontconfig version using “yum info fontconfig”, the version didn’t change. The wkhtmltopdf didn’t work either.

[...] be aware of this missing dependancy issue in Centos5 which will crash wkhtmltopdf. Solution: upgrade your dependancies. Aside: [...]