Test in a live environment
Test in production without watermarks.
Works wherever you need it to.
Ever-improving technology means time-saving solutions for everyone, and especially developers. There are many factors to take into account when rendering content from PDF files, and even more so when converting different formats to PDF. It is fair to say that developers have had difficulties working with PDF files in C# for many years. Happily, these issues have now been solved with the completion of numerous libraries designed to read, write, create, and convert to PDF from different formats.
For example, IronPDF offers a library that undergoes continuous and rigorous testing to ensure full compatibility with all developers' systems. Moreover, IronPDF provides ongoing support and direct customer engagement to guarantee that feature requests and bug fixes are addressed quickly and efficiently.
This article will compare two of the most popular PDF libraries for .NET and .NET Core developers. These two libraries are:
IronPDF and EVOPDF are both libraries that provide methods to create, manipulate and print PDFs in .NET and .NET Core. The next question is to decide which C# PDF Library is best suited for your .NET project. You can weigh up your decision as you read the following comparison between the two libraries and their respective standout features for converting and manipulating PDFs.
Let's look firstly at what both libraries have to offer, and then move on to the comparison itself.
The IronPDF .NET PDF library solution is a dream for developers, and especially software engineers using C#. You can easily create a core PDF library for .NET with this excellent tool.
IronPDF uses a .NET Chromium engine to render HTML pages to PDF files. With HTML to PDF there is no need to use complex APIs to position or design PDFs. IronPDF supports standard web documents: HTML, ASPX, JS, CSS, and images.
It also enables you to create a .NET PDF library using HTML5, CSS, JavaScript and images. You can effortlessly edit, stamp, and add headers and footers to a PDF. Further, it makes it very easy to read PDF text and extract images. This all in one package attracts developers for free as well as the deployment of commercial applications.
Some of the important features include:
Create PDFs (HTML to PDF)
Edit Existing PDF Documents without Adobe Acrobat
Manipulate Existing PDF Documents
Convert from Multiple Formats
Save and Print
Here are some of the most important EVO PDF Features:
Main Features
Use the following steps to create an ASP.NET website:
Figure 1 – New Project Dialog Box
Figure 2 – Web Forms
Now the project is created and we are almost ready to test the libraries. However, we still need to install and integrate them into our project. Let's install IronPDF first.
There are four ways to download and install the IronPDF library. They are as follows:
Let’s take a closer look at each one.
Visual Studio provides the NuGet Package Manager to install NuGet packages in your projects. You can access it through the Project Menu, or by right-clicking your project in the Solution Explorer. Both these options are shown below in screenshots as Figures 3 and 4.
Figure 3 – Project Menu > Manage NuGet Packages
Figure 4 – Right Click Solution Explorer
Once selected, browse for the IronPDF package and install it, as shown in the screenshot below.
Figure 5 – Install IronPDF from NuGet Package
Another way to download and install IronPDF C# Library is to make use of the following steps to install the IronPDF NuGet package through the Developer Command Prompt.
Type the following command:
Install-Package IronPdf
The third way to download and install IronPDF is to follow the steps below. This can be done by visiting the NuGet site directly and downloading the package. The steps are:
You can directly download the IronPDF .DLL file directly from the website. It can be directly downloaded from the IronPDF DLL download.
Figure 6 – Direct Download IronPDF C# Library
Reference the library in your project by using the following steps:
All done! IronPDF is downloaded, installed, and ready to use. However, we should first download and set up the EVO HTML to PDF Converter.
The EVO HTML to PDF Converter for .NET does not use any third-party tools, and no installations or special settings are necessary on the server in order to get it working. The product is delivered into a zip archive and doesn't have an installer. You have to simply unzip the archive in a folder on the disk.
The EVO HTML to PDF Converter offers separate libraries for .NET Framework 4.0 and later and for .NET Core 2.1, .NET 3.0, and later runtimes.
The HTML to PDF converter library from these links works well both in 32-bit and 64-bit environments. The 64-bit environments offer more memory for the executing processes and the version below is optimized to take advantage of this opportunity when converting very large HTML documents:
The HTML to PDF converter library is also available as a NuGet package that can be downloaded and referenced directly from your Visual Studio project as it does not require installation.
After downloading the zip archive, unzip the downloaded archive, and you get the following files:
Top Level Files
We have now created the project and installed the necessary libraries. You can read the library documentation for further details. Let's begin comparing the IronPDF and EVOPDF libraries in terms of code.
Both libraries provide the facility to convert an HTML webpage to PDF. Let's have a look at the code for each library one-by-one.
IronPDF makes it very straightforward to render HTML from existing URLs as PDF documents. There is a very high level of support for JavaScript, Images, Forms, and CSS.
The following code uses IronPDF to create a PDF document directly from a website address:
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
Pdf.SaveAs("url.pdf");
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
var Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/");
Pdf.SaveAs("url.pdf");
Dim Renderer As New IronPdf.ChromePdfRenderer()
Dim Pdf = Renderer.RenderUrlAsPdf("https://ironpdf.com/")
'
Pdf.SaveAs("url.pdf")
With the EVO PDF converter, it also takes only one a few lines of code to convert a web page from a given URL to a PDF document:
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl("https://www.evopdf.com/");
// Write the PDF document buffer to HTTP response
Response.BinaryWrite(outPdfBuffer);
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl("https://www.evopdf.com/");
// Write the PDF document buffer to HTTP response
Response.BinaryWrite(outPdfBuffer);
Dim htmlToPdfConverter As New HtmlToPdfConverter()
Dim outPdfBuffer() As Byte = htmlToPdfConverter.ConvertUrl("https://www.evopdf.com/")
' Write the PDF document buffer to HTTP response
Response.BinaryWrite(outPdfBuffer)
IronPDF and EVO PDF both provide the facility to generate PDF from a string containing HTML.
The following code shows that a PDF document can be rendered using an HTML input string. You can choose simple HTML, or also incorporate CSS, images, and JavaScript.
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>").SaveAs("pixel-perfect.pdf");
// Load external html assets: images, css and javascript.
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
var PDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
PDF.SaveAs("html-with-assets.pdf");
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>").SaveAs("pixel-perfect.pdf");
// Load external html assets: images, css and javascript.
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
var PDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
PDF.SaveAs("html-with-assets.pdf");
Dim Renderer = New IronPdf.ChromePdfRenderer()
Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>").SaveAs("pixel-perfect.pdf")
' Load external html assets: images, css and javascript.
' An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
Dim PDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", "C:\site\assets\")
PDF.SaveAs("html-with-assets.pdf")
The following code shows that a PDF document can be generated using a string containing HTML. The HTML input string can also be used to convert to in-memory PDF, and write the resulting PDF to an HTTP response.
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
string htmlString = "<img src='icons/iron.png'>";
string baseUrl = @"C:\site\assets\";
outPdfBuffer = htmlToPdfConverter.ConvertHtml(htmlString, baseUrl);
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
string htmlString = "<img src='icons/iron.png'>";
string baseUrl = @"C:\site\assets\";
outPdfBuffer = htmlToPdfConverter.ConvertHtml(htmlString, baseUrl);
Dim htmlToPdfConverter As New HtmlToPdfConverter()
Dim htmlString As String = "<img src='icons/iron.png'>"
Dim baseUrl As String = "C:\site\assets\"
outPdfBuffer = htmlToPdfConverter.ConvertHtml(htmlString, baseUrl)
IronPDF IronPDF provides conversion from Angular JS, ASPX pages, XML files, and images to PDF documents.
EVOPDF EVOPDF provides conversion from SVG images, Word (.docx documents), Excel (.xlsx documents), and RTF to PDF documents.
Now, let's have a look at an "images to PDF" conversion code comparison between IronPDF and EVOPDF.
In the IronPDF library, PDF documents can be easily constructed from one or more image files using the IronPdf.ImageToPdfConverter Class. IronPDF provides a wide variety of image formats. Supported files are: .apng, .avif, .bmp, .cur, .dib, .gif, .ico, .jfif, .jif, .jpe, .jpeg, .jpg, .pjp, .pjpeg, .png, .svg, .tif, .tiff, .webp
// One or more images as IEnumerable. This example selects all JPEG and SVG images in a specific folder.
var ImageFiles = System.IO.Directory.EnumerateFiles(@"C:\project\assets").Where(f => f.EndsWith(".jpg") || f.EndsWith(".svg"));
// Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\composite.pdf");
//Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
// One or more images as IEnumerable. This example selects all JPEG and SVG images in a specific folder.
var ImageFiles = System.IO.Directory.EnumerateFiles(@"C:\project\assets").Where(f => f.EndsWith(".jpg") || f.EndsWith(".svg"));
// Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\composite.pdf");
//Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
' One or more images as IEnumerable. This example selects all JPEG and SVG images in a specific folder.
Dim ImageFiles = System.IO.Directory.EnumerateFiles("C:\project\assets").Where(Function(f) f.EndsWith(".jpg") OrElse f.EndsWith(".svg"))
'
' Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs("C:\project\composite.pdf")
'
'Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
The EVO HTML to PDF Converter offers full support for SVG vector graphics. The EVO SVG to PDF Converter can be used in any type of .NET application to convert SVG vector images to PDF documents. You can convert SVG images to PDF documents in memory or to PDF files in a folder. It does not depend on any other third-party tools.
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
// Convert the HTML page with SVG to a PDF document in a memory buffer
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl("your url with svg image goes here");
// Instruct the browser to open the PDF file as an attachment or inline
Response.AddHeader("Content-Disposition", String.Format("attachment; filename=SVG_to_PDF.pdf; size={0}", outPdfBuffer.Length.ToString()));
// Write the PDF document buffer to HTTP response
Response.BinaryWrite(outPdfBuffer);
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
// Convert the HTML page with SVG to a PDF document in a memory buffer
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl("your url with svg image goes here");
// Instruct the browser to open the PDF file as an attachment or inline
Response.AddHeader("Content-Disposition", String.Format("attachment; filename=SVG_to_PDF.pdf; size={0}", outPdfBuffer.Length.ToString()));
// Write the PDF document buffer to HTTP response
Response.BinaryWrite(outPdfBuffer);
Dim htmlToPdfConverter As New HtmlToPdfConverter()
' Convert the HTML page with SVG to a PDF document in a memory buffer
Dim outPdfBuffer() As Byte = htmlToPdfConverter.ConvertUrl("your url with svg image goes here")
' Instruct the browser to open the PDF file as an attachment or inline
Response.AddHeader("Content-Disposition", String.Format("attachment; filename=SVG_to_PDF.pdf; size={0}", outPdfBuffer.Length.ToString()))
' Write the PDF document buffer to HTTP response
Response.BinaryWrite(outPdfBuffer)
EVO PDF Software is free to use or can be purchased to remove the evaluation message from the generated PDF documents. The licensing model is simple and consists of two types of licenses: the Deployment License and the Company License. You can purchase the EVO HTML to PDF Converter as a separate product or you can purchase it as part of the EVO PDF Toolkit which comprises all other PDF tools for all the platforms at a highly discounted price. Specifically, the EVO HTML to PDF Converter for all platforms deployment license is available at $450. The EVOPDF complete licensing details are available at this link.
IronPDF is also free for development and can always be licensed for commercial deployment. Licenses are available for single-project use, single developers, agencies, and global corporations, as well as SaaS and OEM redistribution. All licenses include a 30-day money-back guarantee, one year of product support & updates, validity for dev/staging/production, and also a permanent license (one-time purchase). The Lite package starts from $749. IrondPDF packages are permanent and there are no ongoing costs.
Summary
IronPDF does not render HTML to PDF from a remote server. It actually spins up an instance of a real standard-compliant web browser behind the scenes (without any additional software needing to be installed). HTML is rendered with complete accuracy — and in a vector format suitable for the highest standards of commercial printing. The output is a clean and high-quality PDF. IronPDF is widely available for commercial use, with licensing and pricing details all published on the website. Further, IronPDF provides ongoing email and chat support for customers, ensuring that bug fixes, feature requests and more are addressed promptly.
The EVOPDF library does not rely on external tools or services and does not require installation or server configuration changes; it supports simple copy deployment. The rendering is extremely accurate — and the resulting PDF preserves all the graphics, images, texts, fonts, and layout of the original HTML document, no matter how complex. With the EVO HTML to PDF Converter, not only can you create great new PDF documents, but you can also edit, merge, split and fill existing PDF documents. It is free to use and can be licensed for a single developer or multiple developers.
Conclusion
IronPDF and EVO PDF both work offline and generate excellent PDFs. Each library has its own advantages over the other. IronPDF is highly recommended for pragmatic coders seeking to work effectively and efficiently. It undergoes rigorous testing, with monthly updates ensuring continuous improvement. Most importantly, it is time-saving.
EVO PDF can be useful when dealing with PDFs in different server-side languages, as it is also available on various other platforms in various programming languages. EVOPDF provides a demo license key that needs to be changed and updated to the purchased license key manually. IronPDF is free of these additional changes.
One of the major highlights of IronPDF is that it supports almost all image formats being converted to PDF, while the EVO PDF Software Converter only supports SVG images to PDF pages. IronPDF allows conversion from simple image files, whereas EVO PDF only allows for the conversion of images within an HTML document structure. However, EVO PDF allows conversions from Word documents, Excel files, and RTF files to the same PDF document.
9 .NET API products for your office documents