EvoPdf Chromium for .NET

Features list itemConvert Modern Web Pages Using the Latest Standards and Technologies

EVO HTML to PDF Converter Box EvoPdf Chromium for .NET is a library that can be easily integrated into any type of .NET application to convert web pages and HTML strings to PDF or to image. It can be used in .NET applications targeting .NET Standard, .NET Core and .NET Framework on Windows, Linux and Azure platforms.

The HTML to PDF converter component of the library uses a rendering engine based on Chromium, which can render all cutting-edge, modern HTML, CSS and JavaScript content in conformance with the latest standards and technologies currently avaialble.

The product is bundled and distributed as two separate NuGet packages for Windows and Linux including the same .NET Standard 2.0 library and different native runtimes. Targeting .NET Standard 2.0, makes the packages compatible with a large spectrum of .NET Core and .NET Framework versions.

The main functionality of the library is to convert HTML documents to PDF and images. But the library does much more than this. You can automatically generate an outline with bookmarks for the generated PDF document, set permissions, password protect or digitally sign the generated PDF document.

PurchasePurchase ContactSupport DownloadDownload

DownloadCompatibility

EvoPdf Chromium for .NET is compatible with Windows and Linux 64-bit platforms supporting .NET Standard 2.0, including:

  • Windows 10, Windows Server 2016 64-bit and above
  • Linux 64-bit Distributions
  • .NET Core 8.0, 7.0, 6.0, 5.0, .NET Standard 2.0
  • .NET Framework 4.6.2 to 4.8.1
  • Azure App Service and Azure Functions
  • Azure Windows Cloud Services and Virtual Machines
  • Web, Console and Desktop applications

DownloadASP.NET C# Demo Application

The ZIP package you can download from website includes a Visual Studio project for the ASP.NET Core demo application with C# sample code for all major library features. The two folders for Windows and Linux include the same application, the only difference is the NuGet package referenced by each of them.

On Windows, you can run the demo application from this package without any special setup. On Linux, before running the demo application, you should first follow the steps from online documentation to setup the Linux machine.

DownloadGetting Started

You can quickly start with the ASP.NET demo application available for download, or you can integrate the library in your own project. In the online documentation you can find detailed instructions about running an application using EvoPdf Chromium Library for .NET on Windows and Linux machines, in Azure App Service and Azure Functions for Windows and Linux. In general, the application deployment on Windows platforms does not require any setup while deployment on Linux platforms requires the additional configuration described in documentation.

Code Sample IconC# Code Samples

At the top of your C# source file add the using EvoPdf.Chromium; statement to make available the EvoPdf Chromium API for your .NET application.

// add this using statement at the top of your C# file
using EvoPdf.Chromium;

To convert an URL to a PDF document in a memory buffer and then save the data from buffer into a file you can use the C# code below.

// create the converter object in your code where you want to run conversion
HtmlToPdfConverter converter = new HtmlToPdfConverter();

// convert an URL to a memory buffer
string htmlPageURL = "http://www.evopdf.com";
byte[] urlToPdfBuffer = converter.ConvertUrl(htmlPageURL);

// write the memory buffer to a PDF file
System.IO.File.WriteAllBytes("UrlToMemory.pdf", urlToPdfBuffer);

To convert a HTML string or an URL to a PDF document in a memory buffer and then save it to a file you can use the C# code below.

// create the converter object in your code where you want to run conversion
// change the serverIP value if the server was installed on a remote machine
string serverIP = "127.0.0.1";
HtmlToPdfConverter converter = new HtmlToPdfConverter(serverIP);

// convert a HTML string to a memory buffer
byte[] htmlToPdfBuffer = converter.ConvertHtml("<b>Hello World</b> from EVO PDF !", null);

// write the memory buffer to a PDF file
System.IO.File.WriteAllBytes("HtmlToMemory.pdf", htmlToPdfBuffer);

// convert an URL to a memory buffer
string htmlPageURL = "http://www.evopdf.com";
byte[] urlToPdfBuffer = converter.ConvertUrl(htmlPageURL);

// write the memory buffer to a PDF file
System.IO.File.WriteAllBytes("UrlToMemory.pdf", urlToPdfBuffer);

To convert in your ASP.NET Core application a HTML string or an URL to a PDF document in a memory buffer and then send it for download to browser you can use the C# code below.

// create the converter object in your code where you want to run conversion
HtmlToPdfConverter converter = new HtmlToPdfConverter();

// convert a HTML string to a memory buffer
byte[] htmlToPdfBuffer = converter.ConvertHtml("<b>Hello World</b> from EVO PDF !", null);

FileResult fileResult = new FileContentResult(htmlToPdfBuffer, "application/pdf");
fileResult.FileDownloadName = "HtmlToPdf.pdf";
return fileResult;