Skip to content

Getting Started Installing wkhtmltopdf

Austio edited this page Feb 12, 2013 · 3 revisions

Suggested steps:

  1. Remove wkhtmltopdf installed using apt-get previously. sudo apt-get remove --purge wkhtmltopdf

  2. Install dependencies. sudo apt-get install openssl build-essential xorg libssl-dev

  3. Download the static binary as per the architecture (i386/amd64) wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2

  4. tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2

  5. sudo chown root:root wkhtmltopdf-i386

  6. sudo cp wkhtmltopdf-i386 /usr/bin/wkhtmltopdf


Windows 8 x64 Install

  1. Setup your wicked_pdf gem and bundle install

  2. Download the executable http://code.google.com/p/wkhtmltopdf/downloads/detail?name=wkhtmltox-0.11.0_rc1-installer.exe

  3. Put it in your #SITE directory

  4. create an initilizer called 'wicked_pdf.rb' WickedPdf.config = { :exe_path => '#SITE\wkhtmltopdf\wkhtmltopdf.exe', }

5 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 .exe part

I plan to amend this as i get closer to production so that it works on my ubuntu server