PDF Generation, Powered by AWS Lambda

What is Api2Pdf?

Api2Pdf is a powerful PDF generation API with no rate limits or file size constraints. Generate PDFs from HTML, URLs, images, office documents, and more. Merge PDFs together. Api2Pdf runs on AWS Lambda, a serverless architecture powered by Amazon to scale to millions of requests while being up to 90% cheaper than alternatives. The REST API provides endpoints for WKHTMLTOPDF, Headless Chrome, LibreOffice, and Merge PDFs. Choose which endpoints you want to use that best suits your needs.

JSON Result

Generate PDFs at Massive Scale on AWS Lambda

Mission Statement

Api2Pdf’s mission statement: Make the experience of generating PDFs for application developers not completely miserable.

Generating PDFs should be fast, cheap, and have no limitations. Popular libraries and APIs like iTextSharp, PDFCrowd, and DocRaptor are unreasonably expensive. You shouldn’t have to break the bank to convert HTML to PDF on Lambda.

Transparency

Our other promise to our customers is transparency. Most API services out there do not publicize what PDF rendering engines they use under the hood. We are the opposite - we are proud to share with you that we offer the tools you already use: wkhtmltopdf, Headless Chrome, and LibreOffice. The problem that most application developers run into is that since so many websites are moving to cloud hosting environments, running these PDF engines have an added layer of complexity. It is not trivial, for example, to run wkhtmltopdf on Heroku. On top of that, it is not cost effective either. Wkhtmltopdf on AWS Lambda is the perfect use-case for HTML to PDF conversion and URL to PDF conversion. However, configuring wkhtmltopdf and Headless Chrome on AWS Lambda can take up valuable time and resources from your development team. That is why we did the heavy lifting for you.

Api2Pdf also provides the much beloved LibreOffice on AWS Lambda. LibreOffice is fantastic because it allows you to convert dozens of file types to PDF including Word to PDF, PowerPoint to PDF, Excel to PDF, and Publisher to PDF. Besides Microsoft Office documents, it is capable of converting images too, such as JPEG, PNG, GIF, and BMP. But in actuality, it can convert any file that can be opened in LibreOffice to PDF. For example, TXT to PDF and EML to PDF is possible. Any file that can be reasonably printed is a candidate for the LibreOffice endpoint.

Merging PDFs is another challenge - and one that most of the PDF generation API services do not provide solutions for. Api2Pdf helps you merge pdfs on AWS Lambda by passing the endpoint a list of URLs to existing PDFs. Api2Pdf will consume those PDFs and combine them all together in the order you specified. Merging PDFs together is quite CPU intensive, and so offloading this to a serverless architecture can reduce the load on your web application.

And last, but not least, the barcode generation API is a nice-to-have. PDFs and barcodes go well together. Printing invoices and receipts to PDF with wkhtmltopdf or Headless Chrome and including a barcode is a very common task that our customers perform.

HTML to PDF Use Cases

Here are just some of the common use cases for converting HTML to PDF with wkhtmltopdf or Headless Chrome.