Simple phantomjs-based html2pdf renderserver for Heroku.
Fork and create a heroku project with phantom buildpack
heroku create --stack cedar --buildpack https://github.com/stomita/heroku-buildpack-phantomjs.git
Pass a URL as query string.
GET https://phantom-renderserver.herokuapp.com/?https://google.com/
Send an HTML document as POST
body.
POST https://phantom-renderserver.herokuapp.com/
<!doctype html>
<html>
<head>...</head>
<body>...</body>
</html>
This implementation outputs PDFs in A4 portrait format. You might want to change for to your needs.
Caution: The web server in phantomjs is not considered robust, so you shouldn't really use this in production.
Based on html2pdf.js by Thomas Bley.
MIT © Norman Rzepka 2014