Getting Started Installing wkhtmltopdf - mileszs/wicked_pdf GitHub Wiki
Linux Distros(mainly Debian/Ubuntu based)
- Remove any
wkhtmltopdfinstalled usingapt-get
sudo apt-get remove --purge wkhtmltopdf
- Install necessary dependencies
sudo apt-get install openssl build-essential xorg libssl-dev
- Download the static binary as per the architecture(i386/amd64)
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
- Untar de compressed file
tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
- Changer ownership of the executable
sudo chown root:root wkhtmltopdf-i386
- Move it the expected path to be usable system wide
sudo cp wkhtmltopdf-i386 /usr/bin/wkhtmltopdf
Windows 8 x64 Install
-
Setup your
wicked_pdfgem and runbundle install -
Download the executable
http://code.google.com/p/wkhtmltopdf/downloads/detail?name=wkhtmltox-0.11.0_rc1-installer.exe -
Place it in your
#SITEdirectory -
create an initilizer in
config/initializers/wicked_pdf.rbwith following code:
WickedPdf.config = {
:exe_path => '#SITE\wkhtmltopdf\wkhtmltopdf.exe'
}
- Make sure that your server is running in a context that can write to that location with any pdf files otherwise, they will fail. Also don't miss the
.exepart.