Archive for the ‘Example Uses’ Category


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

Merge PDFs together with Python on AWS Lambda

October 10th, 2018 / by api2pdf /

Intro Api2Pdf is a REST API that allows you to generate PDFs at massive scale. Among the functions that Api2Pdf provides, merging PDFs together is one of the more popular capabilities. It is quite simple to do in Python, and this article will show you how. Merge PDF API In order to merge PDFs together, […]

Read More

Free Bootstrap 4 HTML Template for Displaying Database Records to PDF

October 7th, 2018 / by api2pdf /

Intro The following HTML template is excellent if you have a need to print any of the following items to PDF. Generic application form Job application form Contest submission form Award submission nomination form Grant application form Scholarship application form Any kind of database record or form submission If you are a developer, you likely […]

Read More

OpenStreetMap + LeafletJS + PDF

September 5th, 2018 / by api2pdf /

Introduction Generating a map is hard enough.  Google has recently clamped down on their APIs which has left developers scrambling for open source solutions.  In today’s article we will take a look at how to embed an OpenStreetMap tile into a PDF using LeafLet.js. For our example, we have taken an example from the Leaflet.js […]

Read More

Adding a Watermark with WKHTMLTOPDF

September 5th, 2018 / by api2pdf /

Introduction If you are on this article, you already know what a watermark is, but just to be sure, it is a way of adding an image to a document to show where it was generated from or to avoid tampering for some reason.  A common use of watermarking is to add the word DRAFT […]

Read More

CKEditor Save to PDF Plugin

September 4th, 2018 / by api2pdf /

Intro CKEditor4 is a battle tested and widely used WYSIWYG html editor. In this post we will discuss how to use our open source plugin for saving the document to PDF. Example Code + Demo Feel free to check out our github page for detailed step by step documentation. HTML Code The above HTML code […]

Read More

Convert HTML to PDF with client side javascript and jquery

September 2nd, 2018 / by api2pdf /

It is rare, but there may be some situations where the only option you have to convert HTML to PDF or a URL to PDF is from the client-side javascript. Now there are some existing options such as jsPDF, but they are severely limited. An ideal situation would be to have access to wkhtmltopdf or […]

Read More