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 setting (including digital signatures), PDF merge/split, text, html and image drawing into pdf, PDF form fields filling, PDF portfolios and many more. SelectPdf for .NET can be used to easily convert HTML to PDF with C#/VB.NET in high quality. 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 default WebKit rendering engine, a restricted engine is used on Azure Web Apps and some features are not available. Starting with v26.2, the Chromium rendering engine also runs on Azure Web Apps (Basic plan or above) with the full HTML-to-PDF feature set - see Chromium Engine. More details here: Deployment to Microsoft Azure.
Note: this library works on Windows systems. Need Linux, Docker or cross-platform .NET? Use SelectPdf.Universal - the cross-platform edition of SelectPdf, which keeps the classes and members of this library (porting existing code means new package references, the SelectPdf.Universal namespace instead of SelectPdf, and SelectPdf's own drawing types instead of System.Drawing). See Cross-Platform Library, Migrating to SelectPdf.Universal and, for containers, Deployment to Docker.
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.AddFont(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: