EVO PDF Client for .NET Overview

The EVO PDF Client library for .NET can be easily integrated into any application targeting .NET Framework, .NET Core or .NET Standard 2.0 to create, read, edit and save PDF documents. A central component of the library is the HTML to PDF Converter, which allows you to convert web pages, HTML strings and streams to PDF or images. The converter supports HTML5, CSS3, SVG, Canvas, web fonts and JavaScript. It combines the powerful, printer-friendly PDF format with the flexibility of HTML into a modern tool for creating nicely formatted and easily maintainable PDF reports and documents.

The library is much more than just an HTML to PDF converter. You can also convert HTML to raster images or SVG, edit, merge or split existing PDF documents, convert Word and Excel documents to PDF, convert PDF pages to images, HTML or text documents, extract images from PDF documents and search text in PDF documents.

To use EVO PDF Client for .NET in your applications, you first have to install the EVO PDF Server. The server can be installed as an Azure Cloud Service Worker Role, Azure Cloud Service Web Role, Azure Service Fabric application, IIS ASP.NET web application or Windows service.

EVO PDF Client

EVO PDF Client for .NET is delivered as a ZIP archive that you can download from the website and extract to a local folder. The product folder has the following structure:

Lib Folder

The Lib folder contains the EVO PDF Client binaries for .NET Standard 2.0 and .NET Framework 4.0.

The net40 sub-folder contains the assembly built for .NET Framework 4.0, which can be directly referenced by applications targeting .NET Framework 4.0 or later.

The netstandard2.0 sub-folder contains the assembly built for .NET Standard 2.0, which can be used in applications targeting .NET 6, 7, 8, 9 or 10. The assembly from this folder can also be directly referenced.

The sub-folders under Lib also include the XML API reference documentation.

Samples Folder

The Samples folder contains demo projects for .NET Framework and modern .NET (6 and later). It provides ready-to-use code examples for all major features of the library.

The net48 sub-folder contains ASP.NET MVC and ASP.NET WebForms projects targeting .NET Framework 4.8.

The net8.0 and net10.0 sub-folders contain ASP.NET Core projects targeting .NET 8.0 and .NET 10.0. These projects reference the EvoPdf.Client package.

NuGet Package

The product is also distributed as a NuGet package, which provides a convenient way to reference the product binaries in .NET projects.

The EvoPdf.Client package contains assemblies for both .NET Framework and .NET Standard and can be referenced in projects targeting .NET Framework, .NET or .NET Standard 2.0 and later.

EVO PDF Server

Before you start using EVO PDF Client for .NET in your applications, you first have to install EVO PDF Server. You can find more information about downloading and installing the server in the Server Installation section.

After EVO PDF Server is installed, you are ready to use EVO PDF Client Library for .NET. Reference the library directly or use the NuGet package in your project, then copy the code lines from the sections below to use the HTML to PDF Converter component to create a PDF document from a web page.

You can also use our demo web applications from the Samples folder. They offer an interface to enter the installed server IP address or the web service URL, depending on the type of server you installed.

Use a local EVO PDF TCP/IP Server

If EVO PDF Server is installed on the same Windows machine where you run your application, then the HTML to PDF Converter client object constructor does not require additional parameters.

A typical scenario for this usage case is when you install EVO PDF Server as a Windows service on the same machine running the client library.

The HTML to PDF Converter client object will try to connect to EVO PDF Server installed on the localhost default IP address 127.0.0.1 on the default TCP port 40001.

C#
using EvoPdfClient;
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl(url);

Use a remote EVO PDF TCP/IP Server

If EVO PDF Server is installed as a TCP/IP server on a remote machine, you have to specify the HTML to PDF Service IP address in the HTML to PDF Converter client object constructor.

A typical scenario for this usage case is when you install EVO PDF Server in an Azure Cloud Service Worker Role, an Azure Service Fabric application or a Windows service on a remote Windows machine.

The code below initializes an HTML to PDF Converter object that will connect to a server running on a specified IP address and TCP port. If the port is not specified, then the default port 40001 will be used.

C#
using EvoPdfClient;
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter(serverIP, serverPort);
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl(url);

Use a remote HTML to PDF HTTP Server

If EVO PDF Server is installed as an HTTP server on a remote machine, you have to specify the HTML to PDF Service HTTP URL address in the HTML to PDF Converter client object constructor.

A typical scenario for this usage case is when you install EVO PDF Server in an Azure Cloud Service Web Role or in an IIS ASP.NET web application.

The code below initializes an HTML to PDF Converter object that will connect to a server running at a specified HTTP URL.

C#
using EvoPdfClient;
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter(true, serverHttpUrl);
byte[] outPdfBuffer = htmlToPdfConverter.ConvertUrl(url);

See Also