wkhtmltopdf on AWS Lambda
Api2Pdf runs wkhtmltopdf on AWS Lambda. PDF generation on a serverless architecture like AWS Lambda has several advantages: 1) You only pay for the processing power to generate the PDFs when you need it. 2) It scales infinitely. 3) You can handle massively large files and CPU usage or a just a tiny bit.
Instead of running your own VMs at full capacity on the off-chance someone is going to generate a huge PDF and crush your server, serverless solves this problem.
After building PDF generation API tech stack to service our own needs, we spent some time retooling it so that every developer can sign up and get started within minutes.
Api2Pdf offers three endpoints for wkhtmltopdf:
- URL to PDF (Simple GET Request)
- URL to PDF (POST with advanced wkhtmltopdf options)
- HTML to PDF (POST with advanced wkhtmltopdf options)
An example of a simple GET request with the HTML to PDF API is:
Don’t hesitate to contact us.