Click or drag to resize

Installation

There are 2 ways to install ExpertPdf Html To Pdf Library:

  • Using a NuGet package (.NET Framework and .NET Core)

  • Downloading assemblies

Installation using Nuget Packages

The easiest way to install ExpertPdf is by using a Nuget Package. Create your project, go to Nuget Package Manager and install one of the following packages:

.NET Framework version - AnyCPU (.NET 2.0 and .NET 4.0-4.5) - ExpertPdf.HtmlToPdf: https://www.nuget.org/packages/ExpertPdfHtmlToPdf/.

.NET Framework version - x64 optimized version - ExpertPdf.HtmlToPdf-x64: https://www.nuget.org/packages/ExpertPdfHtmlToPdf-x64/.

.NET Core version - Windows only (and .NET 4.6.1 and .NET 4.7.2) - ExpertPdf.HtmlToPdf.NetCore: https://www.nuget.org/packages/ExpertPdf.HtmlToPdf.NetCore/.

.NET Core version - x64 optimized version - Windows only (and .NET 4.6.1 and .NET 4.7.2) - ExpertPdf.HtmlToPdf.NetCore.x64: https://www.nuget.org/packages/ExpertPdf.HtmlToPdf.NetCore.x64/.

Blink Rendering Engine - Windows only (for .NET Core and .NET 4.6.1 and .NET 4.7.2)- ExpertPdf.HtmlToPdf.NetCore.Blink: https://www.nuget.org/packages/ExpertPdf.HtmlToPdf.NetCore.Blink/.

Blink Rendering Engine - x64 version - Windows only (for .NET Core and .NET 4.6.1 and .NET 4.7.2)- ExpertPdf.HtmlToPdf.NetCore.Blink.x64: https://www.nuget.org/packages/ExpertPdf.HtmlToPdf.NetCore.Blink.x64/.

Note 1: If the x64 version is used, the application needs to target x64 platform and it needs to run in an x64 worker process.

Note 2: The .NET Core version is for .NET Core 2.0 or above through .NET Standard 2.0. Currently it requires a Windows system to run. It does not work on Linux or Mac or Xamarin.

Note 3: Blink rendering engine only works with .NET Core version and with .NET Framework starting with 4.6.1. Blink rendering engine was introduced with ExpertPdf v14.0.

Installation using Downloaded Assemblies

The ExpertPDF HTML to PDF Converter for .NET is delivered as a zip archive and it doesn't have an installer. You have to unzip the archive in a folder on the disk. Below is a brief description of the folders from the archive.

Bin Folder

Bin folder contains the .NET 2.0 assemblies you can use in your application and one prebuilt Windows Forms sample application that you can use to quickly check if the converter can run correctly in your environment.

Bin/.NET_4.0 folder contains the .NET 4.0 assemblies you can use in your application and one prebuilt Windows Forms sample application that you can use to quickly check if the converter can run correctly in your environment.

ephtmltopdf.dll - is the HTML to PDF converter library that you can link in any .NET application, either Windows Forms or ASP.NET.

ephtmltopdf.xml - is the HTML to PDF converter API reference in XML format for Visual Studio IntelliSense.

epengine.dll - is the library used by the converter to render web pages.

Doc Folder

Doc folder contains the HTML to PDF Converter manual and the API reference in chm and html format.

Samples Folder

Samples folder contains C# and VB.NET full sample applications to offer you ready to use code for ASP.NET, ASP.NET MVC, Windows Forms and Console applications. Each sample has a solution file .sln that you can directly open in different version of Visual Studio.

AspNet_GettingStarted - is an ASP.NET application which shows how to convert web pages and HTML code to PDF and images. The application uses the HTML to PDF Converter library with the default settings.

AspNet_InvoicesDemo - is an ASP.NET application which shows how to dynamically generate PDF invoices from a ASP.NET page. The application uses the HTML to PDF Converter library to convert a HTML string to PDF.

AspNet_HtmlConvertDemo - is an ASP.NET application which shows how to convert web pages and HTML code to PDF and images. The application uses the HTML to PDF Converter library and shows you how to set various conversion parameters like the headers and footers, page size, page orientation, compression level, etc.

HtmlElementsLocationInPdf - is an ASP.NET application which shows how to retrieve the location in PDF of various HTML elements.

MultipleHtmlConversions - is an ASP.NET application which shows how to convert many HTML document into the same PDF document.

TableOfContentsAndBookmarks - is an ASP.NET application which shows how to automatically create a table of contents in the generated PDF document.

RepeatTableHeadOnEachPage - is an ASP.NET application which shows how to automatically repeat the head of a HTML table on each PDF page where the table is rendered.

WinForms_HtmlConverterFeaturesDemo - is a Windows Forms application which shows how to convert web pages and HTML code to PDF and images. The application uses the HTML to PDF Converter library and shows you how to set various conversion parameters like the headers and footers, page size, page orientation, compression level, etc.

WinForms_NavigateAndConvertDemo - is a Windows Forms application which shows how to convert web pages and HTML code to PDF while you are navigating in Internet. The application uses the HTML to PDF Converter library. Using this application it is possible to convert pages from websites requiring authentication at application level implemented with a custom login page.

WinForms_HtmlInHeaderAndFooter - is a Windows Forms application which shows how to add HTML in header and footer of the rendered PDF document. Here you can also find code to add page numbers in footer.

WinForms_PrependAppendExternalPdfs - is a Windows Forms application which shows how to convert many URLs into the same PDF document.

WinForms_HtmlElementsLocationInPdf - is a Windows Forms application which shows how to retrieve the location in PDF of various HTML elements.

WinForms_MultipleHtmlConversions - is a Windows Forms application which shows how to convert many HTML document into the same PDF document.

WinForms_TableOfContentsAndBookmarks - is a Windows Forms application which shows how to automatically create a table of contents in the generated PDF document.

WinForms_RepeatTableHeadOnEachPage - is a Windows Forms application which shows how to automatically repeat the head of a HTML table on each PDF page where the table is rendered.

Console_HtmlConvertDemo - is a Console application which shows how to convert web pages and HTML code to PDF and images. The application uses the HTML to PDF Converter library and shows you how to set various conversion parameters like the headers and footers, page size, page orientation, compression level, etc.

Console_BatchConversion - is a Console application which shows how to use the converter to convert to PDF documents all the HTML files from a specified folder and its subfolders.

Console_MultithreadedPerformance - is a Console application which can be used to measure the performance of the converter in a multithreaded environment.