Archive for 2018


The journey of migrating PDF generation to a serverless architecture

November 6th, 2018 / by api2pdf /

Api2Pdf is a REST API that helps application developers generate PDFs at massive scale. It was co-founded by myself, Zack Schwartz, and my partner Kunal Johar. The two of us also run another company called OpenWater. OpenWater’s customers live and die by PDFs. And they are not normal PDFs either. Often times, the PDFs are […]

Read More

Debugging Amazon S3, Lambda, Timeouts, ContentOperationNotPermitted, wkhtmltopdf, and Headless Chrome

November 1st, 2018 / by api2pdf /

Intro You ever run into a bug that is so perplexing you don’t even know where to begin? I’d like to share a story that happened this week. As you may know, Api2Pdf runs on AWS Lambda. AWS Lambda is Amazon’s serverless compute service that lets you scale to countless requests very easily. Our two most […]

Read More

[Solved] Could not install package ‘Api2Pdf 1.0.1’. Project that targets ‘.NETFramework,Version=v4.5.1’

October 26th, 2018 / by api2pdf /

Intro You may get this error if you are trying to install a package via NuGet into your .NET application. The full error reads something like: Could not install package ‘Api2Pdf 1.0.1’. You are trying to install this package into a project that targets ‘.NETFramework,Version=v4.5.1’, but the package does not contain any assembly references or […]

Read More

[Solved] ContentNotFoundError wkhtmltopdf exited with code 1

October 26th, 2018 / by api2pdf /

Video Instruction of Problem Intro If you are using wkhtmltopdf, an open source HTML to PDF library, you might find that sometimes you receive a “ContentNotFound wkhtmltopdf exited with code 1” error. The error is common and can be easily solved. We see it happen frequently with Api2Pdf customers and so we wanted to write […]

Read More

Convert HTML to PDF with C# and .NET Core

October 18th, 2018 / by api2pdf /

Intro .NET Core (dotnetcore) is all the rage now and it truly is the future of Microsoft’s .NET Framework. It is cross-platform, lightweight, and wicked fast. Api2Pdf’s web portal is built on .NET Core. So we love it. However, libraries that work with PDF manipulation have been slow to roll out .NET Core compatible versions. […]

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

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