- pdfkit ruby gem: https://github.com/pdfkit/pdfkit
- pdfkit: https://pdfkit.org/
-
Install wkhtmltopdf For local testing, wkhtmltopdf is installed globally using homebrew:
brew install --cask wkhtmltopdf
-
Install dependencies (just pdfkit)
bundle install
-
Run generate.rb
ruby generate.rb
-
You should see an error rejecting any params that are not allowed for wkhtmltopdf. The trouble here is that the params were not meant for wkhtmltopdf, they were meant for pdfkit.
-
If you look at the source code of the pdfkit ruby gem, you will see the PDFKit initializer is meant to accept options object as second argument. The trouble is that those same options are passed to wkhtmltopdf's initializer where they are not allowed.