Simple phantomjs-based html2pdf renderserver for Heroku.
Fork and create a heroku project with phantom buildpack
heroku create --stack cedar --buildpack http://github.com/stomita/heroku-buildpack-phantomjs.git
Pass a URL as query string.
GET http://phantom-renderserver.herokuapp.com/?http://google.com/
Send an HTML document as POST
body.
POST http://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