Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install wkhtml2pdf on ubuntu precise 64bit (12.04 LTS) with patched QT
# I managed to get the compiled version with patched QT working on ubuntu precise 64bit (12.04 LTS) and thought I'd share my bash history in the hopes it might spare others some trouble shooting.
# Also note that this install process takes rather long, you might want to consider running it in a screen or something
# you will be needing git if you haven't got it yet
sudo apt-get install git-core
# as per installation instructions, install dependencies for wkhtmltopdf
sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev
# clone the repo
git clone git://github.com/antialize/wkhtmltopdf.git wkhtmltopdf
# install qt dependencies, see http://qt-project.org/doc/qt-4.8/requirements-x11.html
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
# get qt
git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt
cd wkhtmltopdf-qt
git checkout 4.8.4
QTDIR=. ./bin/syncqt
# important here is to note that the -nomake arguments are in quotes as andrei mentioned in the comments before
./configure -nomake "tools examples demos docs translations" -opensource -prefix ../wkqt
# if make fails because you have no Makefile, then something in configure went wrong, check the output for clues
make -j3 && make install
# installing wkhtmltopdf
cd ../wkhtmltopdf
# now, run qmake in this directory:
../wkqt/bin/qmake
# finally, make wkhtmltopdf (if you get permission errors, run make and make install as sudo)
make && make install
@jasbir

This comment has been minimized.

Copy link

commented Feb 4, 2014

Hi, can you please share the .Exe for the windows.

@cravecode

This comment has been minimized.

Copy link

commented Apr 3, 2014

WOW it worked! Thank you for posting your notes!!

@cie101

This comment has been minimized.

Copy link

commented Jun 5, 2014

Does this work on Ubuntu 14.04? I am getting build errors when i execute line 30 Thanks!

@ashkulz

This comment has been minimized.

Copy link

commented Jun 9, 2014

This is obsolete -- it is better to use the binaries or build system of wkhtmltopdf.

@hidechae

This comment has been minimized.

Copy link

commented Dec 27, 2015

Hi, git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt doesn't work.
Do you know how to resolve?

@napoli1890

This comment has been minimized.

Copy link

commented Feb 5, 2016

@hidechae I've exactly your problem, I found a read-only copy of repo here:
https://qt.gitorious.org/qt/antializes-qt.git
so, you have to type this:
git clone https://qt.gitorious.org/qt/antializes-qt.git wkhtmltopdf-qt
please note https://, git:// does not work :)

@LeBaThuan

This comment has been minimized.

Copy link

commented Jun 16, 2016

git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt doesn't work.
You can try git clone https://github.com/wkhtmltopdf/qt.git then git checkout 4.8

@tejastank

This comment has been minimized.

Copy link

commented Mar 14, 2017

git clone https://github.com/wkhtmltopdf/qt.git --branch 4.8

Fire this command will be better, for qt based wkhtmltopdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.