I wanted to use wkhtmltopdf on an Ubuntu 14,04 webserver. Up to now I have been always working with the binaries directly. However, after I downloaded the binaries from http://wkhtmltopdf.org/ these came up with the following error:
./wkhtmltox-i386.deb: line 1: syntax error near unexpected token `newline' ./wkhtmltox-i386.deb: line 1: `!'
As I did not have much more time to lose, I followed the tutorial here (which dated almost 2 years ago, and was for Ubuntu 12.04). After some minor adjustments, was able to produce the desired result. Here is the code snippet:
apt-get install wkhtmltopdf apt-get install xvfb echo 'xvfb-run --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh chmod a+rx /usr/bin/wkhtmltopdf.sh ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf/usr/bin/wkhtmltopdf.sh