[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 /

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 this article to assist. […]

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

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