Click or drag to resize
Pdf Library for .NET

Welcome to SelectPdf Library for .NET

SelectPdf for .NET is a professional PDF library that can be used for creating, writing, editing, handling and reading PDF files without any external dependencies within .NET applications. Using this .NET PDF library, you can implement rich capabilities to create PDF files from scratch or process existing PDF documents entirely through C#/VB.NET without installing Adobe Acrobat.

Many rich features can be supported by SelectPdf for .NET PDF API, such as security settings (encryption with AES-256, digital signatures and their validation), PDF merge, text, html and image drawing into pdf, PDF form fields filling, PDF portfolios, PDF redaction, PDF/A, PDF/X and accessible PDF/UA documents, electronic invoices (ZUGFeRD / Factur-X) and many more. SelectPdf for .NET can be used to easily convert HTML to PDF with C#/VB.NET in high quality, synchronously or asynchronously, and to convert Word documents to PDF (DOCX, DOC, RTF and more). SelectPdf can also extract text from existing PDF documents or search for text in PDF documents and can convert PDF pages to raster images (PNG, BMP, JPEG, TIFF).

SelectPdf provides versions for .NET Framework and .NET Core 2.0 and above (through .NET Standard 2.0). This includes .NET 5 - .NET 10 and above.

SelectPdf runs on Azure cloud, including Azure Web Apps (Basic plan or above), with the full HTML-to-PDF feature set. The Chromium rendering engine renders headless and needs no special configuration - see Chromium Engine. More details here: Microsoft Azure.

SelectPdf runs on Windows (x64, x86), Linux (x64, arm64) and macOS (Apple Silicon).

Sample Code

Coding with SelectPdf is very easy. Take a look at the section below:

// create a new pdf document
PdfDocument doc = new PdfDocument();

// add a new page to the document
PdfPage page = doc.AddPage();

// create a new pdf font
PdfFont font = doc.Fonts.Add(PdfStandardFont.Helvetica);
font.Size = 20;

// create a new text element and add it to the page
PdfTextElement text = new PdfTextElement(50, 50, "Hello world!", font);
page.Add(text);

// save pdf document
doc.Save(file);

// close pdf document
doc.Close();

Converting from html to pdf using SelectPdf Library for .NET is just as easy:

// instantiate a html to pdf converter object
HtmlToPdf converter = new HtmlToPdf();

// create a new pdf document converting an url
PdfDocument doc = converter.ConvertUrl(url);

// save pdf document
doc.Save("Sample.pdf");

// close pdf document
doc.Close();
See Also