Bad wkhtmltopdf's path for wicked_pdf and wkhtmltopdf

KKB picture KKB · Jun 4, 2015 · Viewed 7k times · Source

I am using two Gems to convert HTML to PDF.

Using "https://github.com/mileszs/wicked_pdf"

gem 'wicked_pdf'
gem "wkhtmltopdf-binary"

/initializer/wicked_pdf.rb

WickedPdf.config = {
  exe_path =>  "xxxxxxxxxxxxxxxxxxx"
}

What path should I use for the exe_path ?

Answer

Vrushali Pawar picture Vrushali Pawar · Jun 4, 2015

which wkhtmltopdf

This will give you path of your wkhtmltopdf. You should copy this path and paste in your config/intializers/wicked_pdf.rb And then restart your server.