Small microservice for rendering HTML input to PDF
A small microservice that turns HTML into a PDF file. You can run this:
Dockerfile
though, since I didn’t need it. PR welcome!There also exists a small client library for Go
While we’re confident in this project’s code, ultimately this is a wrapper to wkhtmltopdf, and thus
you should be aware of its status and its
security considerations:
You can start a local server process with:
$ html2pdf server
Then call it from the client:
$ export HTML2PDF_TOKEN="doesntMatter" # optionally you can put the service behind authentication
$ html2pdf client-localhost '<h1>hello world</h1>' > out.pdf
Usage from curl is also simple:
$ curl -d '{"html_base64": "PGgxPmhlbGxvIHdvcmxkPC9oMT4="}' http://localhost/render > out.pdf
$ apt install -y libxrender1 libxext6 libfontconfig1
(Fortunately, these exist in Lambda’s AMI)
Basic support (no guarantees) for issues / feature requests via GitHub issues.
Paid support is available via function61.com/consulting
Contact options (email, Twitter etc.) at function61.com