NReco.PdfGenerator 1.2.1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET Standard 2.0 .NET Framework 4.5
dotnet add package NReco.PdfGenerator --version 1.2.1
NuGet\Install-Package NReco.PdfGenerator -Version 1.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NReco.PdfGenerator" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NReco.PdfGenerator --version 1.2.1
#r "nuget: NReco.PdfGenerator, 1.2.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install NReco.PdfGenerator as a Cake Addin
#addin nuget:?package=NReco.PdfGenerator&version=1.2.1

// Install NReco.PdfGenerator as a Cake Tool
#tool nuget:?package=NReco.PdfGenerator&version=1.2.1

HTML to PDF converter for C#/.NET (WkHtmlToPdf wrapper). Generates pretty-looking PDF by HTML template or web page URL. Web page is rendered using QtWebKit engine and PDF result is very similar to a web browser view. Engine supports page header/footer, page numbering, custom fonts, javascript execution.
NReco.PdfGenerator nuget can be used for free in non-SaaS apps that have only one single-server production deployment.

This nuget package embeds wkhtmltopdf binaries (for Windows; they're extracted on first use automatically - you don't need to deploy wkhtmltopdf separately) and can be used only on Windows. For cross-platform deployments NReco.PdfGenerator.LT nuget should be used instead.

var htmlContent = String.Format("Hello world: {0}",DateTime.Now);
var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter();
var pdfBytes = htmlToPdf.GeneratePdf(htmlContent);

More info (PdfGenerator online demo, examples): https://www.nrecosite.com/pdf_generator_net.aspx

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on NReco.PdfGenerator:

Package Downloads
NF-CL-TRELLIS

Core Framework Library

SE2.LabManager.PdfExport

pdfExporter

UnyTools.Boleto

UnyBoleto

2001

Basic Library

Employer.Wfat.BoletoNet

Gerador de boleotos

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on NReco.PdfGenerator:

Repository Stars
smartstore/SmartStoreNET
Open Source ASP.NET MVC Enterprise eCommerce Shopping Cart Solution
mike-ward/Markdown-Edit
My attempt at a markdown editor for windows
BoletoNet/boletonet
Boleto.Net is a library developed for use in Brazil, given it has been programmed with Brazilian retail legislation and business rules for bank registered billing integration.
BoletoNet/boleto2net
Nova versão do Boleto.Net
Version Downloads Last updated
1.2.1 2,445 1/8/2023
1.2.0 365,065 6/13/2020
1.1.15 1,799,788 3/30/2017
1.1.14 77,083 2/18/2017
1.1.12 441,148 2/3/2016
1.1.11 48,333 12/14/2015
1.1.10 152,959 10/1/2015
1.1.9 6,708 8/29/2015
1.1.7 20,804 7/5/2015
1.1.6 29,400 3/5/2015
1.1.5 20,459 2/6/2015

NReco.PdfGenerator nuget includes wkhtmltopdf binaries (Windows build) and can be used only on Windows; for cross-platform deployments use NReco.PdfGenerator.LT nuget package.

v.1.2.1 changes:
- added netstandard2.0 build: now NReco.PdfGenerator nuget (includes wkhtmltopdf) can be used in NET6/NET7/.NET Core apps (Windows deployments only) with free offering!
- added more options to PageSize enum (A0-A9, B0-B9, Legal)
- added static License.SetLicenseKey to set a license key globally (for all HtmlToPdfConverter instances)

v.1.2.0 changes:
- wkhtmltopdf upgraded to 0.12.6 (released on 2020-Jun-11)
- framework target changed to net45 (net20 is not supported anymore)

v.1.1.15 changes:
- added GeneratePdfFromFiles overload that accepts individual options (like header/footer) for each input

v.1.1.14 changes:
- WkHtmlToPdf tool upgraded to version 0.12.4 (released 2016-Nov-22)
- all necessary VC++ Runtime 2015  dlls are included
- now for ASP.NET apps wkhtmltopdf binaries are extracted to App_Data\wkhtmltopdf by default