PDF Libs for C#
May 19, 2020

PDF Libs for C#

A quick and admittedly superficial comparison of available PDF libraries for C#/.Net

In one of our projects we need to be able to edit text in pdf docs using C# (.Net framework 4.8), and possibly sign the document as well. Not very fancy requirements but a good opportunity to compare available libraries that may be up to the task. Note that this will be a quick post on the topic, not the result of extensive research and comparison.

Our current front-runner in terms of affordability with a good feature set is: ABCpdf. Great features with good documentation and it doesn't cost a grand.

Disclaimer: this is our company blog mostly for our own benefit and we make no money off of it, and you won't find any affiliate links here.

A good starting point: https://www.reddit.com/r/dotnet/comments/8a83jh/what_is_the_current_best_way_of_creating_pdf/

Listed in order of popularity (avg daily downloads on Nuget)...\

dl/d = avg-downloads-per-day

PdfSharp   ◆   1,524 dl/d   ◆   👎

PdfSharp 1.50.5147
PDFsharp is the Open Source .NET library that easily creates and processes PDF documents on the fly from any .NET language. The same drawing routines can be used to create PDF documents, draw on the screen, or send output to any printer. This is the PDFsharp PDF Core package. See Project Informatio…

By far the most popular package in large part probably because it's open-source and free.

However, there doesn't seem to be any straightforward support for signing pdf documents, and the existing documentation is a little convoluted and lacking.

iText7   ◆   778 dl/d   ◆   $?   ◆   👎

itext7 7.1.11
iText 7 represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high- and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every wo…

Originally started as "iTextSharp", an open-source and free port of a java library for editing pdf-s, it was rebranded "iText" and rewritten and fully commercialized. The original iTextSharp lib has been deprecated.

Currently there is an "open-source" version licensed under AGPL - but that means your own app has to be open-source to use it. No published pricing available for the commercial edition, you have to fill in a contact for to get a quote and give a valid phone number. Not a fan of that, so as awesome as it might be, we're skipping it for now. Also way too much legal banter on the website and the documentation is difficult to navigate.

API docs

Aspose.PDF for .NET   ◆   654 dl/d   ◆   $999+

Aspose.Pdf 20.5.0
Aspose.PDF for .NET is a PDF document creation and manipulation component that enables your .NET applications to read, write and manipulate existing PDF documents without using Adobe Acrobat. It also allows you to create forms and manage form fields embedded in a PDF document. This component is writ…

$999 per project which is out of our budget range.

Syncfusion Essential PDF   ◆   538 dl/d   ◆   $995+

Syncfusion.Pdf.Net.Core 18.1.0.53
Syncfusion Essential PDF is a .NET standard PDF library used to create, read, and edit PDF files in any .NET Core applications. Key features: • Create, edit, fill, and flatten the AcroForm form fields. • Merge, split, rearrange, and remove pages. • Create accessible PDF (PDF/UA) from scratch. • Wat…

Again, $995 per project is just too expensive for our needs.

Also, lots of reports of large memory usage and crashes...

IronPDF   ◆   303 dl/d   ◆   $399+   ◆   👎

IronPdf 2020.3.2
IronPDF allows developers to create, edit and extract PDF content in .NET Standard, Core and Framework Projects. The Iron PDF library takes the frustration out of generating PDF documents by not relying on proprietary APIs. “Html-To-Pdf” renders pixel-perfect PDFs from open standard document types:…

$399/project which is acceptable pricing. Lots of great examples and the documentation is easy to navigate. Easy to sign pdf-s as well. Unfortunately, it's a more limited library than the previous ones because it uses an embedded Chromium web browser to render PDF from html. Their own FAQ explains this well:

When using iTextSharp PDF library, each piece of pdf text, graphic, table or line is “plotted” or drawn onto a PDF. This model allows precision but many developers complain that it is time consuming to generate PDFs - and that it is very time hard to closely match existing design styles or web assets.
The iTextSharp DLL has advanced PDF manipulation APIs that are powerful, and follow the PDF standard closely.
When viewing iTextSharp documentation, we see is a port of a Java Library called "iText". In keeping, the methodology and programatic interface has a distinct Java flavor.
In contrast, Iron PDF uses an embedded, full Chromium based web browser renderer to convert html to pdf (including C# code examples) allowing developers to generate PDFs from HTML, images and CSS.

From: "Is IronPDF an iTextSharp Alternative?"

ABCpdf   ◆   256 dl/d   ◆   $329 - $479+   ◆   👍

ABCpdf 11.3.8
PDF creation and manipulation using ABCpdf - a powerful and flexible PDF component for .NET. ABCpdf is a .NET component for PDF manipulation. As such, you’ll find it documented for C# and VB.NET, with numerous PDF code examples and freely adaptable projects, all designed to help you get up to speed…
ABCpdf gets up close and personal! Because it doesn’t use any print drivers and goes Direct to PDF™ it’s incredibly fast. ABCpdf incorporates virtually every feature you're ever likely to need in a PDF library.

They have a great page explaining digital signatures. The library also seems to have a lot of features. Their documentation is also very easy to understand and navigate.

GemBox.Document for .NET   ◆   210 dl/d   ◆   $240+   ◆   👎

GemBox.Document 31.0.1175
GemBox.Document is a .NET component that enables developers to read, write, convert and print document files (DOCX, DOC, PDF, HTML, XPS, RTF, TXT) from .NET applications in a simple and efficient way.

This seems to be a more limited library for now. For example, "GemBox.Pdf supports filling in a PDF interactive form. Currently, only filling in of toggle button fields (PdfCheckBoxField and PdfRadioButtonField) is supported."

Spire.PDF   ◆   166 dl/d   ◆   $599+

Spire.PDF 6.5.9
Spire.PDF for .NET is a versatile PDF library that enables software developers to generate, edit, read and manipulate PDF files within their own .NET applications. As a standalone PDF component, Spire.PDF for .NET provides users an incredible wealth of features without installing Adobe Acrobat. This…

Seems a bit expensive, so that's as far as we got.

Apitron.PDF.Kit  ◆   78 dl/d   ◆   $1,300+

Apitron.PDF.Kit 2.0.29
It is 100% managed code and doesn’t require special manipulations to run with any .NET framework version starting from 2.0. PDF standard versions supported are: ALL versions. Files can be normal, linearized, password-protected, signed, incrementally updated. - We support many possible PDF conten…
Apitron PDF Kit is a .NET component that allows you to do whatever you want with PDF files. Add text, images, drawings, sign documents and much more.
You can also edit existing content using its friendly and easy to use API. It’s 100% managed code and doesn't require special manipulations to run with any .NET framework version starting from 2.0..

Sounds good but way too expensive!

Some others we didn't spend so much time with...

Essential Objects EO.Pdf  ◆   162 dl/d   ◆   $799+

EO.Pdf 20.1.45
EO.Pdf for .NET is a set of .NET components for you to easily create, read or modify PDF file in your Microsoft.NET application (both ASP.NET Web application and traditional Windows application). It also includes a powerful HTML to PDF converter that can handle almost everything a Web browser can ha…

Select.Pdf  ◆   126 dl/d   ◆   $499+

Select.Pdf 20.1.0
SelectPdf can be used as a general purpose PDF library in any .NET application. It offers the possibility to create or modify existing documents, add new elements (like text, html, images, shapes), change pdf document security settings, merge or split existing documents and many more. Select.Pdf al…

DynamicPDF  ◆   61 dl/d   ◆   $899+

DynamicPDF 8.0.0
ceTe DynamicPDF 8.0.0 for .NET binaries. Requires a license for actual usage (http://www.dynamicpdf.com/Products/DynamicPDFForNET/Merger/Download.csp)

ComponentPro PDF Document  ◆   7 dl/d   ◆   $599

ComponentPro.Pdf 7.2.234
Ultimate PDF (http://www.componentpro.com/products/pdf) lets you add the capability of creating, modifying and converting PDF documents to your .NET applications in just a few lines of code. It also supports converting HTML to PDF with latest supports for HTML5 and CSS3. It works with Wpf, WinForms,…

PDFLib

(couldn't find a nuget package)

Adobe® PDF Library™ SDK by Datalogics

There are also a lot of html-to-pdf-converter libs, such as:

EvoPDF  ◆   200 dl/d   ◆   $450+

EvoPDF 8.0.0
EVO HTML to PDF Converter is a .NET library that can be easily integrated in any type of .NET application to convert web pages, HTML strings and streams to PDF or to image. The converter has support for HTML5, CSS3, SVG, Canvas, Web Fonts and JavaScript. Does not require installation or any third pa…
EVO HTML to PDF Converter is a .NET library that can be easily integrated in any type of .NET application to convert web pages, HTML strings and streams to PDF or to image.

Other references

PDF Libs for C#
Share this