Archive for September, 2018


Solution for overlapping content when generating PDFs with table headers and footers

September 10th, 2018 / by api2pdf /

Developers often run into an issue when converting HTML to PDF that contains tables. The issue is that if the content runs onto the next page, the table headers (<thead>) and footers (<tfoot>) are repeating and overlapping on each other when they shouldn’t be. This happens on both wkhtmltopdf and Headless Chrome. In fact, it […]

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

Convert HTML to PDF with nodejs / javascript

September 2nd, 2018 / by api2pdf /

Intro Here at Api2Pdf, we are proud to announce a new client library for nodejs! Our node library makes it easy to convert HTML to PDF, URL to PDF, Word to PDF, and Merge PDFs together. We support a number of endpoints such as wkhtmltopdf, Headless Chrome, and LibreOffice. View the documentation for our Nodejs […]

Read More