Skip to content

Configuring wicked_pdf for Heroku

Yaroslav Shmarov edited this page Apr 25, 2021 · 2 revisions

Here is thorough documentation to get the wicked_pdf gem working on Heroku. It specifically addresses the issues surrounding wkhtmltopdf.

http://stackoverflow.com/a/16577677/307308


other approach worth trying:

Gemfile

gem 'wicked_pdf'
gem "wkhtmltopdf-binary", group: :development
gem "wkhtmltopdf-heroku", group: :production

config/initializers/wicked_pdf.rb

WickedPdf.config ||= {}
WickedPdf.config.merge!({
  # layout: "pdf.html.erb",
})