In addition to passing in a URL, it would be great if I could pass in a string of HTML, as is supported by the Ruby wkhtmltopdf gems out there. I know this is possible in PhantomJS by using the following code:
var page = require('webpage').create();
page.content = '<html><body><p>Hello world</p></body></html>';