IronPdf 2021.12.4401

Install-Package IronPdf -Version 2021.12.4401
dotnet add package IronPdf --version 2021.12.4401
<PackageReference Include="IronPdf" Version="2021.12.4401" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IronPdf --version 2021.12.4401
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: IronPdf, 2021.12.4401"
#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 IronPdf as a Cake Addin
#addin nuget:?package=IronPdf&version=2021.12.4401

// Install IronPdf as a Cake Tool
#tool nuget:?package=IronPdf&version=2021.12.4401
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Passing Nuget Downloads Support

IronPDF helps C# Software Engineers to create, edit and extract PDF content in .NET projects.

  • C# HTML to PDF for .NET 5, Core, Standard, and Framework
  • Work with PDFs in C# using HTML, MVC, ASPX, and images
  • Generate, Edit, Read and Secure PDF Documents

Generate PDFs with Pixel Perfect Chrome HTML to PDF Rendering

The Iron PDF library takes the frustration out of generating PDF documents by not relying on proprietary APIs. “Html-To-Pdf” renders pixel-perfect PDFs from open standard document types: HTML, JS, CSS, JPG, PNG, GIF, and SVG. In short, it uses the skills that developers already possess.

Fully Supports:

Windows, MacOS, Linux, Azure, Docker and AWS

Licensing & Support available

For code examples, tutorials and documentation visit https://ironpdf.com/ Email: developers@ironsoftware.com

Get Started Code Example


using IronPdf;

  

var Renderer = new IronPdf.ChromePdfRenderer();

Renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>").SaveAs("pixel-perfect.pdf");

  

/****** Advanced ******/

// Load external html assets: images, css and javascript.

// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from

var PDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");

PDF.SaveAs("html-with-assets.pdf");

Documentation Links

Compatibility

Welcome to the cutting edge of .NET PDF rendering and manipulation technology with IronPDF 2021 now featuring Chrome identical HTML rendering with full support for:

  • C#, F#, and VB.NET

  • .Net 5, Core 2x & 3x, Standard 2, and Framework 4x

  • Console, Web, & Desktop Apps

  • Windows, Linux (Debian, CentOS, Ubuntu), MacOs, Docker, and Azure

  • Microsoft Visual Studio or Jetbrains ReSharper & Rider

Generating PDFs

Generate PDFs in C# with HTML, MVC, ASPX, & images.

  • HTML to PDF using HTML Files, Strings, URLs, ASPX, Razor and MVC Views

  • Image to PDF and PDF to Image

  • Supports Base 64 Encoding, Base URLs, and Custom File Paths

  • Website & System Logins, Custom User Agents, Proxies, Cookies, HTTP Headers, Async & Multithreading

Formatting PDFs

Supports HTML, JS and CSS Standards using modern Chrome Rendering

  • HTML (5 and below), CSS (Screen & Print), Images (jpg, png, gif, tiff, svg, bmp), JavaScript (+ Render Delays), Fonts (Web & Icon)

  • Use Responsive Layouts, Set Virtual Viewports and Zoom

  • Apply Headers & Footers, Page Numbers, and Page Breaks

  • Page Settings for Custom Paper Size, Orientation & Rotation, Margins (mm, inch, & zero), Color & Grayscale, Resolution & JPEG Quality

  • International Language Support with UTF-8 HTML Encoding

Manipulating PDFs

Edit, Read and Secure PDF Documents

  • Merge & Split PDFs. Add / Duplicate / Delete Pages

  • Add New HTML Content, Headers & Footers, Stamp & Watermark, Backgrounds & Foregrounds, Annotations, Outlines & Bookmarks

  • Create, Edit, and Fill PDF Forms

  • Apply PDF Metadata, Permissions & Passwords, Digital Signatures

  • Print PDFs to Physical Printers

  • Read Text and Images from PDFs

You can email us at developers@ironsoftware.com for support directly from our code team. We offer licensing and extensive support for commercial deployment projects.

Installing IronPDF 2021

=============================================================

To Install:


PM> Install-Package IronPdf

Upgrade Guide for Existing Users

IronPdf updates all usages of your existing HtmlToPdf and AspToPdf code to use our new Chrome Rendering Engine.

Remove any reference to IronPdf.Threading which is now legacy software. The IronPdf main package is threading and async compatible!

Try out the new 2021 API

We haven’t broken the IronPDF API you are using, it will remain!

However, the old style is being superseded by a better one to give you more control. For examples you now have Print options and Http Login controls specific to your renderer


using IronPdf;

//...

ChromePdfRenderer Renderer = new ChromePdfRenderer();

Renderer.RenderingOptions.FitToPaper = true;

Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen;

Renderer.RenderingOptions.PrintHtmlBackgrounds = true;

Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;

var doc = Renderer.RenderHtmlAsPdf(“<h1>Hello world!</h1>“);

//var doc = Renderer.RenderUrlAsPdf(“https://www.google.com/”);

//var doc = Renderer.RenderHtmlFileAsPdf(“example.html”);

doc.SaveAs(“google_chrome.pdf”);

Pixel perfect Chrome rendering!

This example will give you PDFs which are pixel perfect to the latest chrome desktop browser’s “print to pdf” functionality:


ChromePdfRenderer Renderer = new ChromePdfRenderer();

Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;

Renderer.RenderingOptions.PrintHtmlBackgrounds = false;

Renderer.RenderingOptions.CreatePdfFormsFromHtml = false;

var doc = Renderer.RenderUrlAsPdf(“https://www.google.com/”);

However...we would recommend using improved features such as:

Using screen stylesheets to print PDFs which are less fiddly to develop and more true to existing web assets.

  • Responsive layout support

  • Creating PDF Forms from your HTML form elements.


ChromePdfRenderer Renderer = new ChromePdfRenderer();

Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen;

Renderer.RenderingOptions.PrintHtmlBackgrounds = true;

Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;

Renderer.RenderingOptions.ViewportWidth = 1080 ; //px

var doc = Renderer.RenderUrlAsPdf(“https://www.google.com/”);

Comparing Chrome and WebKit

You can use the IronPdf.Rendering.AdaptivePdfRenderer to switch between the ‘Chrome’ and ‘WebKit’ rendering at an instance level if you preferred the old rendering style for some of your application, or dont want to break unit tests.


using IronPdf;

//...

IronPdf.Rendering.AdaptivePdfRenderer Renderer = new IronPdf.Rendering.AdaptivePdfRenderer();

Renderer.RenderingOptions.RenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome; //switch between Chrome and WebKit here

var doc = Renderer.RenderHtmlAsPdf(“<h1>Hello world!</h1>“);

Use every CPU core available!

  • Multithreading and Async support for our Chrome rendering engine is in a different league to previous build.

  • For enterprise grade multi-threading use our Chrome in your existing threads and it will work. For web applications this also takes zero setup.

  • For batch processing for HtmlToPdf we suggest using the built in .NETParallel.ForEach

  • We love async and have provided Async variants of methods such as ChromePdfRenderer.RenderHtmlAsPdf

MSDN Style Class Reference

Explore the IronPDF API in the left navigation of this page.

Popular Links include:

NuGet packages (18)

Showing the top 5 NuGet packages that depend on IronPdf:

Package Downloads
PDF.Core

IronPDF for .Net Core 2.x and 3.x allows developers to create, edit and extract PDF content within .Net Core Applications & Websites. The Iron PDF Core library takes the frustration out of generating PDF documents by not relying on proprietary APIs. "Html-To-Pdf" renders pixel-perfect PDFs from open standard document types: HTML, JS, CSS, JPG, PNG, GIF, and SVG. In short, it uses skills that developers already posses. Key features include: * "Html-To-Pdf" creates PDF files from HTML, CSS, JavaScript, and Images. * "Url-To-Pdf" generates PDFs from existing html pages by simply providing their URL. * "Image-To-PDF" creates PDF documents from image files. * PDF to Image functionality can render PDF documents to image files. * Extract text and images from existing PDFs. * Create, Fill and read data from PDF forms. * Merge, Split and Manipulate PDFs to edit PDF structure and content. * Add Page Numbers, Headers, Footers, Watermarks, Tables, Text and Image Assets. * Edit, Stamp and Watermark PDF files with text, images and HTML * Apply HTML or PDF backgrounds to PDF pages * Sign PDF files with digital certificates IronPDF can be used within ASP.NET projects, MVC, Web Services, Console & Desktop Applications. Requires .Net Core 2.x, 3.x or higher. Supports Windows, Ubuntu, Debian, CentOS, BSD, MacOS and Azure platforms. Licensing & Support available for commercial deployments. For code examples, documentation & more visit http://ironpdf.com For support please email us at developers@ironsoftware.com

Dynamicweb.Imaging.Providers.IronPdfProviders

IronPdf providers for pdf handling

Bastion.Recipients.Api

Package Description

IronPdf.Threading

Multithreading Plugin Assets for the IronPDF Nuget Package. Allows IronPDF to render PDF documents from HTML using all available system cores. https://ironpdf.com/

Pdf.Ocr

PDF Complete by Iron Software is a full suite of C# & VB.Net PDF tools: It includes PDF generation, html-to-pdf, editing and OCR in 17 international languages. Iron's PDF Complete creates & edits PDFs as well as reading and extracting PDF & Image text content. The library allows developers to add PDF & OCR functions to MVC, Desktop, Console and Web applications. * IronPDF includes: "Html-To-Pdf" to render PDFs from standard file formats: HTML, JS, CSS, JPG, PNG, GIF, and SVG. "Url-To-Pdf" generates PDFs from an existing URL's html page. "ASPX-To-Pdf" converts ASP.NET documents into pdfs. IronPDF allows developers to Merge, Split and Manipulate PDFs as well as adding Page Numbers, Headers, Footers, Watermarks, Tables, Text and Image Assets. Code Samples and tutorials available at http://ironpdf.com * PDF Complete adds an advanced PDF OCR (Optical Character Recognition) & Barcode reading library. The engine pre-processes scans to improve resolution, color simplification and contrast as well as reducing background noise, rotation, page distortion, and page skewing. It detects image quality and adjusts pre-processing automatically for great results every time. Content output as plain text, barcode data or as structured data. Multiple Language packs available at http://ironsoftware.com/csharp/ocr/ Windows .Net Framework 4.0 required. Can be installed on cloud hosting such as Microsoft Azure or Amazon Web Services. Licensing & Support available for commercial deployments. For code examples, documentation & more visit http://ironpdf.com. For support please email us at developers@ironsoftware.com

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2021.12.4401 1,539 12/1/2021
2021.11.4257 9,038 11/15/2021
2021.9.3737 32,775 9/20/2021
2021.9.3689 10,911 9/7/2021
2021.9.3678 9,316 8/26/2021
2021.3.1 341,282 3/8/2021
2021.1.29 61,047 1/29/2021
2020.12.3 68,538 12/18/2020
2020.12.2 81,773 12/7/2020
2020.10.3.3 219,355 10/14/2020
2020.10.2 43,778 10/7/2020
2020.9.0 214,148 9/1/2020
2020.8.1 31,327 8/14/2020
2020.8.0 39,956 8/1/2020
2020.7.1 28,481 7/15/2020
2020.6.0 145,991 6/1/2020
2020.3.2 190,394 3/25/2020
2020.3.1.1 31,462 3/11/2020
2020.3.0 22,617 3/2/2020
2020.1.0 269,437 1/9/2020
2019.8.9 62,817 12/3/2019
2019.7.0 78,047 10/2/2019
2019.6.5.41 51,450 8/28/2019
5.2.0.1 151,971 3/22/2019
5.0.5.2 14,707 2/14/2019
4.4.9 245,575 6/15/2018
4.4.8 18,084 5/25/2018
4.4.6.2 23,915 1/22/2018
4.4.5 29,578 9/6/2017
4.4.1.2 16,618 6/6/2017
4.4.0.6 4,437 1/18/2017
4.4.0 1,806 12/5/2016
4.2.2 7,876 2/22/2016
4.1.0 1,338 10/31/2015
4.0.0 23,879 9/3/2015

* Adds official support for Azure functions! See https://ironpdf.com/docs/ for more information
* Adds support for Azure Function logging and other custom logging implementations
* Fixes bug causing hanging when rendering multiple documents (20-30+) at once
* Fixes bug causing hanging when document margin(s) exceed document size (margins will be defaulted to zero)
* Fixes bug when initializing a pdf document from a Stream object
* Fixes bug when converting centimeters to millimeters using SetCustomPaperSizeinCentimeters()
* Fixes bug causing exception when calling RenderThisPageAsPdf() without specifying print options
* Fixes bug resulting in an incorrect path when using Installation.CustomDeploymentDirectory
* Fixes MacOs memory issues (previously already fixed on Windows and Linux)
* Improves behavior when rendering for the first time in a persistent environment (e.g. first render on a web server)
* Improves sizing logic when converting a pdf document to an image
* Improves and streamlines logging and logging configuration
* Improves and clarifies error messages
* Updates to Chromium Embedded Framework v96.0.14