Why does PDFKit/wkhtmltopdf hang but renders PDF as expected when Rails app is killed?

The problem is with wkhtmltopdf itself, specifically, any version after 0.9.9. wkhtmltopdf hangs when run directly from the command-line.

Steps to correct:

brew uninstall wkhtmltopdf
cd /usr/local/Library/Formula/
git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb
brew install wkhtmltopdf

Then verify the correct version is installed wkhtmltopdf --version which should yield wkhtmltopdf 0.9.9

Citations:

  1. https://github.com/mileszs/wicked_pdf/issues/110
  2. http://wearepandr.com/blog/article/homebrew-and-installing-old-package-versions#blog_nav

Leave a Comment