[publican-list] Installing wkhtmltopdf for publican

Erich Steinböck erich.steinboeck at gmail.com
Mon Aug 1 14:55:40 UTC 2016


As I didn't find it particularly easy to install wkhtmltopdf for publican,
I'm posting a short how-to here

One should know that publican will be using wkhtmltopdf if it finds it,
else it will use fop.  So to "switch" to wkhtmltopd, we'll just have to
install it.

I'm running Ubuntu 16.04, so my first try was of course
apt get wkhtmltopdf
As running
publican build --formats=pdf --langs=en-US
would then bring up a bunch of wkhtmltopdf errors "is not support using
unpatched qt", I did some research, finding those references:
https://www.redhat.com/archives/publican-list/2014-April/msg00003.html
http://stackoverflow.com/questions/18758589/wkhtmltopdf-installation-error-on-ubuntu

So I did
sudo apt-get remove --purge wkhtmltopdf
sudo apt-get install openssl build-essential xorg libssl-dev

Then, I looked up the "stable" Linux download link from
http://wkhtmltopdf.org/downloads.html, and continued with
wget
http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
tar xf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cd wkhtmltox/bin
sudo chown root:root wkhtmltopdf
sudo cp wkhtmltopdf /usr/local/bin/wkhtmltopdf
wkhtmltopdf --version   # wkhtmltopdf 0.12.3 (with patched qt)

We now have the required "patched" version installed. Again building for
PDF would eventually issue a bunch of "failed loading image" errors and
finally die in the midst of converting pages.  After more research I found
https://www.redhat.com/archives/publican-list/2013-August/msg00005.html
After setting
ulimit -n 8192
the PDF build completed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/publican-list/attachments/20160801/cb66b098/attachment.htm>


More information about the publican-list mailing list