EvoPdf Classic · HTML to PDF for Mono

HTML to PDF for Mono

Classic v14.0 · Windows, .NET Framework 2.0+ and .NET 6–10 · Evaluate without registration — demo mode by default (watermarked) · Licensed with the HTML to PDF Converter license or EVO PDF Toolkit

$dotnet add package EvoPdf.HtmlToPdf

Windows · .NET Framework 2.0+ and .NET 6–10 (.NET Standard 2.0) · the EvoPdf metapackage bundles the Classic HTML to PDF library

Program.csC#
using EvoPdf;

var converter = new HtmlToPdfConverter();
byte[] pdf = converter.ConvertUrl(
    "https://www.evopdf.com");
File.WriteAllBytes("page.pdf", pdf);

// or from an HTML string, with a base URL
pdf = converter.ConvertHtml(
    "<b>Hello World</b>", "https://www.evopdf.com");
Classic API: EvoPdf namespace, one converter class, synchronous calls. API reference →
  • Windows 10 / 11 / Server 2016–2025
  • .NET Framework 2.0 – 4.8.1
  • .NET 6 → 10, .NET Standard 2.0
  • Azure Cloud Services & Virtual Machines
  • Web, console and desktop applications
Documented, with code

Every feature explained with its C# code

The product documentation walks through each capability with the exact C# code, from the converter options to bookmarks, forms and PDF editing. The evaluation package ships the same code as runnable demo projects.

  • Getting started with the converterC# code
  • HTML content destination and scalingC# code
  • Merge multiple HTML pages into one PDFC# code
  • Merge HTML with existing PDF documentsC# code
  • Convert only part of an HTML pageC# code
  • Repeat table header and footerC# code
  • Pages with authentication or through a proxyC# code
  • BookmarksC# code
  • PDF formsC# code
  • Internal links, file links and attachmentsC# code
  • HTML to raster image and SVGC# code
  • Merge, split, stamp and fill PDF documentsC# code
In detail

HTML to PDF for Mono — how it works

EVO PDF Client Library for .NET includes the HTML to PDF functionality and can be integrated in any Mono application to create PDF documents from HTML pages and strings and also to convert HTML to images, HTML to SVG, to create new PDF document, to edit and merge existing PDF documents.

The client library offers in general the same features, quality and API as the regular EVO HTML to PDF Library for .NET and additionally it also includes under the same namespace the API for Word to PDF, Excel to PDF, PDF to Text, PDF to Image, PDF to HTML and PDF Images Extractor components.

EVO HTML to PDF Converter

EVO HTML to PDF Client for .NET is a component of the EVO PDF Client Library for .NET which can be easily integrated in any type of Mono application to convert HTML documents to PDF, raster images or SVG vector images.

The HTML to PDF is a powerful tool helping you to instantly create nicely formatted and easily maintainable PDF documents from HTML pages. The client library offers in general the same features, quality and API as the regular HTML to PDF Library for .NET.

Before starting to use the client library for .NET in your applications you first have to install the EVO PDF Server as described in the sections below. The converter offers full support for HTML5, CSS3, JavaScript, SVG, Web Fonts, page breaks control with CSS and from API, automatically repeated HTML table header and footer, live URLs and internal links, automatically generated hierarchical bookmarks and table of contents, PDF fillable forms, creation of digitally signed and password protected PDF documents.

EVO PDF Client Library for .NET includes also under the same namespace the API for the Word to PDF, Excel to PDF, PDF to Text, PDF to Image, PDF to HTML and PDF Images Extractor components from EVO PDF Toolkit.

Compatibility

The client library for .NET Framework is compatible with any platform which supports .NET Framework 4.0 or above, including the platforms listed below:

  • .NET Framework 4.8.1, 4.7.2, 4.6.1, 4.0 (and above)
  • Windows platforms
  • Azure, Azure App Service and Azure Functions
  • Xamarin for iOS, macOS and Android, Mono
  • Web, Console and Desktop applications

EVO PDF Client Library

EVO HTML to PDF for Mono ZIP package contains the product binaries consisting in EVO PDF Client Library for .NET Framework assembly, demo application with full C# code for Mono, the library documentation in CHM format.

EVO PDF Server

Before starting to use the EVO HTML to PDF Client for .NET in your applications you first have to install the EVO PDF Server. The server can be installed as Azure Cloud Service Worker Role, Azure Cloud Service Web Role, Azure Service Fabric Application, IIS ASP.NET Web Application or Windows Service.

EVO PDF Server package contains the server files and detailed installation instructions for each platform.

Getting Started

After the EVO PDF Server was installed, you are ready to use the EVO PDF Client Library for .NET in your applications. You can quickly start with the demo applications from the Demo folder of this package or you can integrate the library in your own project.

To start with your own project, first add a reference to EvoPdfClient.dll library from the Bin folder of this package.

After the reference to library was added to your project you are now ready to start writing code to convert HTML to PDF in your .NET application

C# Code Samples

Copy the C# code lines from the section below to create a PDF document from a web page or from a HTML string and save the resulted PDF to a memory buffer for further processing or to a PDF file.

The server IP address is assigned during server installation and it can be omitted from HtmlToPdfConverter constructor if the server was installed on the localhost IP address 127.0.0.1 . There are also variants of the constructor accepting an URL instead of IP address if the server was installed as a web service in Azure or in IIS.

At the top of your C# source file add the using EvoPdfClient; statement to make available the EVO PDF Client API for your .NET application.

At a glance

Component
EvoPdf Classic · HTML to PDF for Mono
NuGet package
EvoPdf.HtmlToPdf
Namespace
EvoPdf
Main class
HtmlToPdfConverter
Runs on
Windows · .NET Framework 2.0+ · .NET 6–10 (.NET Standard 2.0)
Version
Classic v14.0
License
HTML to PDF Converter license or EVO PDF Toolkit; evaluation without registration
Documentation →
Sample.csC#
// add this using statement at the top of your C# file
using EvoPdfClient;

To convert a HTML string or an URL to a PDF file you can use the C# code below.

Sample.csC#
// 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 the HTML string to a PDF file
converter.ConvertHtmlToFile("<b>Hello World</b> from EVO PDF !", null, "HtmlToFile.pdf");

// convert HTML page from URL to a PDF file
string htmlPageURL = "http://www.evopdf.com";
converter.ConvertUrlToFile(htmlPageURL, "UrlToFile.pdf");

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.

Sample.csC#
// 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);
Licensing

Perpetual licenses, updates and support included for a year

The HTML to PDF Converter license (450 USD Deployment / 1200 USD Company) covers the Classic and the Next converter; the EVO PDF Toolkit (650 / 1400 USD) covers every component on this site, Classic tools included. The Company License includes redistribution.