PDF libraries for C#
.NET has good libraries for each PDF job, but none of the open-source ones renders pages to images (for that, use a PDFium wrapper such as PDFtoImage or Docnet, or MuPDF.NET under AGPL).
- PdfPig reads PDFs: text with letter positions, words, reading order, images, metadata and annotations. It also creates simple documents and merges files. Apache 2.0, no native dependencies.
- PDFsharp creates PDFs with a GDI+-like drawing API and modifies existing ones: merge, split, rotate, encrypt with AES-256. It doesn’t extract text. AGPL or commercial since version 6.5; 6.2.4 and older are MIT.
- QuestPDF generates documents with a fluent layout API (rows, columns, tables, page headers and footers, automatic page breaks). The best choice for invoices and reports. Free under the Community license for companies with less than $1M annual revenue, otherwise commercial.
- iText does everything: creation, text extraction, forms, digital signatures, PDF/A and PDF/UA. AGPL or commercial.
Pick PdfPig to extract text, QuestPDF to generate reports, PDFsharp to merge, split or encrypt (6.2.4 if you need MIT), and iText when you need signatures or PDF/A and can accept the AGPL or a license fee.
- iText iText is a complete PDF library for .NET under AGPL or a commercial license. How to install it, create a PDF, extract text, merge and split PDFs.
- PdfPig PdfPig is a .NET library to read PDF files: extract text, words and letter positions, images and metadata, merge PDFs and create simple documents.
- PDFsharp PDFsharp is a .NET library to create and modify PDF files (AGPL or commercial since 6.5, MIT before). How to install it, create a PDF with text, merge.
- QuestPDF QuestPDF generates PDF documents in C# with a fluent layout API: pages, headers, tables, images and page numbers. Licensing, installation.