Archive for the ‘Example Uses’ Category


Convert HTML to PDF with javascript and AngularJS

June 13th, 2019 / by api2pdf /

Intro In some cases you may need to convert HTML to PDF from your client side application. Rendering a high quality PDF is not obvious and doing it purely from javascript isn’t feasible either. You need to be able to use a browser-based PDF engine like wkhtmltopdf or Headless Chrome. If you’re looking to generate […]

Read More

Convert HTML to PDF with javascript and VueJs

June 12th, 2019 / by api2pdf /

Intro VueJs is a popular client side javascript framework. It has risen in prominence as an alternative to juggernauts like ReactJs and Angular. Part of its allure comes from its simplicity and lower barrier to entry. While building a VueJs application, you may find yourself in need of generating PDFs. This can push you down […]

Read More

Generate Barcodes and QR codes with Javascript and jQuery (ZXING)

March 20th, 2019 / by api2pdf /

One of the best ways to generate barcodes and QR codes is to use the open source library Zebra Crossing, aka ZXING. It’s available in multiple programming languages, but you can only reliably generate these codes on the server-side. If you are reading this blog post, it probably means you are hoping you can simply […]

Read More

Generate PDF with Python Flask or Django

February 17th, 2019 / by api2pdf /

If you are building a web application in Python with either of the two most popular frameworks – Flask or Django, there’s a good chance you will need to support functionality for PDF generation. Convert HTML to PDF with Flask or Django To generate PDFs, we are going to use API2PDF. API2PDF is a REST […]

Read More

Generate PDFs from Salesforce Apex

February 5th, 2019 / by api2pdf /

We released the full code and documentation on GitHub.  See full details on how to generate PDFs using Salesforce. Many developers moving to Salesforce are used to the power of .NET or Java and have their favorite way of generating PDFs from HTML.  Api2Pdf is a wrapper for wkhtmltopdf, Headless Chrome, and LibreOffice and proudly runs […]

Read More

Convert HTML to PDF with Javascript and React

December 19th, 2018 / by api2pdf /

Intro In a previous post, we provided guidance with how to generate PDFs from HTML and web pages with javascript and jquery. In this post, we provide a sample React component to convert HTML to PDFs using Headless Chrome or wkhtmltopdf. Api2Pdf is an HTML to PDF API that allows developers to generate PDFs at […]

Read More

HTML to PDF with Python and wkhtmltopdf or Headless Chrome

November 22nd, 2018 / by api2pdf /

Intro In this article we will cover converting HTML to PDF format with Python with just a few lines of code and the Api2Pdf API. Api2Pdf is an HTML to PDF API built on AWS Lambda that allows you to produce PDFs at massive scale. Api2Pdf offers both wkhtmltopdf and Headless Chrome as options to […]

Read More

Merge PDFs together with C# and .NET Core

November 18th, 2018 / by api2pdf /

Intro In this article we are going to cover how to merge PDFs together with C# and .NET Core with just a few lines of code using the Api2Pdf dotnet client library. Api2Pdf is a REST API that makes it super easy to generate and combine PDFs. You can view the full documentation of the […]

Read More

Convert powerpoint to PDF with Python and LibreOffice

November 17th, 2018 / by api2pdf /

Intro In this article we are going to demonstrate how easy it is to convert a powerpoint file (ppt, pptx) to a PDF file using Python and the Api2Pdf LibreOffice API endpoint. Api2Pdf is a REST API that makes it easy to generate PDF files from HTML, URLs, and Microsoft Office files. Api2Pdf exposes an […]

Read More

FPDF Alternative for PHP for Generating PDFs

October 10th, 2018 / by api2pdf /

Intro FPDF is an open source library to generate PDFs in PHP. There are some key advantages to this. No external dependencies — can generate basic PDFs straight from PHP code. Free This might be okay for some, but there are issues with FPDF. With a pure PHP implementation, you run into serious problems. You […]

Read More