[Node.js] Using node-wkhtmltopdf

Tadashi Shigeoka ·  Thu, May 15, 2014

Notes on how to use wkhtmltopdf with Node.js. (Last updated: November 28, 2014)

node-wkhtmltopdf

A Node.js wrapper for the wkhtmltopdf command line tool.

wkhtmltopdf

Since the npm module alone won’t work, you need to install wkhtmltopdf separately.

Installing wkhtmltopdf

# the wkhtmltopdf formula is now inactive but still available in the boneyard repository
brew tap homebrew/boneyard

# Install wkhtmltopdf
brew install wkhtmltopdf

Verify that you can generate PDFs with the wkhtmltopdf command.

wkhtmltopdf "http://google.com" google.pdf

That’s all from the Gemba.