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.
Listed in order of popularity (avg daily downloads on Nuget)...\
dl/d = avg-downloads-per-day
PdfSharp ◆ 1,524 dl/d ◆ 👎
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 ◆ $? ◆ 👎
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+
$999 per project which is out of our budget range.
Syncfusion Essential PDF ◆ 538 dl/d ◆ $995+
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+ ◆ 👎
$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 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.
GemBox.Document for .NET ◆ 210 dl/d ◆ $240+ ◆ 👎
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+
Seems a bit expensive, so that's as far as we got.
Apitron.PDF.Kit ◆ 78 dl/d ◆ $1,300+
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+
Select.Pdf ◆ 126 dl/d ◆ $499+
DynamicPDF ◆ 61 dl/d ◆ $899+
ComponentPro PDF Document ◆ 7 dl/d ◆ $599
(couldn't find a nuget package)
There are also a lot of html-to-pdf-converter libs, such as:
EvoPDF ◆ 200 dl/d ◆ $450+
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.