IronPDF 2021 Chrome Rendering Engine EAP

The Iron Software engineering team is proud to release a game-changing upgrade to IronPDF, now featuring “Chrome Identical” PDF rendering.

Download the latest version free to add high-grade rendering in your projects and read the instructions below to implement.

PM > Install-Package IronPdf.EAP


High-Quality Improvements, Rigorously Tested

High-Quality Rendering

The latest “Blink!” HTML rendering. Choose from Chrome Identical rendering or Enhanced Rendering (which we find more accurate and easy to code for than Chrome.)

20% Faster Renders

Provides effortless multithreading and Async, using as many CPU cores as you wish. For SAAS and high-load applications this may be 5-20 times faster, outperforming direct browser usage and web-drivers.

Full Support

Full (and we mean full) support for JavaScript, responsive layout and CSS3.
Azure as a first class citizen. It just works.
Continued maintenance and improved full support for .NET 5, Core, and Framework 4.0+.

Rigorously Tested

The release passed with 1156 green unit & integration tests (and no red ones). We believe this EAP to be as stable as our main release, and has our best minds actively improving it every day.

Section 508 Accessibility Compliance

Produces accessible PDFs using the PDF(UA) tagged PDF standard.

Ongoing Improvements

This EAP is currently for Windows only. Linux and MacOS support will follow shortly.
It is EAP software, we want and need your feedback. Contact developers@ironsoftware.com with ideas or if you need any help getting things running.


Implement in Your Project

1. Implement the Code in Your Project

1.1. Step 1 - Replace with IronPdf.EAP

First you must remove the IronPdf package from your project in Nuget Package Manager and replace it with IronPdf.EAP.

PM > Install-Package IronPdf.EAP

This is essential.

1.2. Step 2 - Upgrade with 1 line of code

Changing to the new renderer at a global level is simple. This approach updates all usages of your existing HtmlToPdf and AspxToPdf code.

Just do this once, before you render any pdfs and you have switched to the new renderer.

IronPdf.Installation.DefaultRenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome;
IronPdf.Installation.DefaultRenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome;
IronPdf.Installation.DefaultRenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome
VB   C#


2. Try the new 2021 API

We haven’t broken the IronPDF C# and VB.NET API you are already using. It will remain! However, the old style is being superseded by a better one to give you more control.

For example, you now have RenderingOptions and HttpLoginCredentials 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");
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");
Imports IronPdf
Private Renderer As New ChromePdfRenderer()
Renderer.RenderingOptions.FitToPaper = True
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen
Renderer.RenderingOptions.PrintHtmlBackgrounds = True
Renderer.RenderingOptions.CreatePdfFormsFromHtml = True
Dim 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")
VB   C#

3. Apply Pixel-Perfect Chrome Rendering

This example will give you PDFs that 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/");
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/");
Dim Renderer As New ChromePdfRenderer()
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
Renderer.RenderingOptions.PrintHtmlBackgrounds = False
Renderer.RenderingOptions.CreatePdfFormsFromHtml = False
Dim doc = Renderer.RenderUrlAsPdf("https://www.google.com/")
VB   C#

We recommend using some Iron-specific improvements.

  • Use screen stylesheets to print PDFs. They are less fiddly to develop and more true to existing web assets.
  • Responsive layout support.
  • Create 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;  //pixels
var doc = Renderer.RenderUrlAsPdf("https://www.google.com/");
ChromePdfRenderer Renderer = new ChromePdfRenderer();
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen;
Renderer.RenderingOptions.PrintHtmlBackgrounds = true; Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
Renderer.RenderingOptions.ViewportWidth = 1080;  //pixels
var doc = Renderer.RenderUrlAsPdf("https://www.google.com/");
Dim Renderer As New ChromePdfRenderer()
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen
Renderer.RenderingOptions.PrintHtmlBackgrounds = True
Renderer.RenderingOptions.CreatePdfFormsFromHtml = True
Renderer.RenderingOptions.ViewportWidth = 1080 'pixels
Dim doc = Renderer.RenderUrlAsPdf("https://www.google.com/")
VB   C#

4. 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 applications, or don't 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>");
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>");
Imports IronPdf
Private Renderer As New IronPdf.Rendering.AdaptivePdfRenderer()
Renderer.RenderingOptions.RenderingEngine = IronPdf.Rendering.PdfRenderingEngine.Chrome
'switch between Chrome and WebKit here
Dim doc = Renderer.RenderHtmlAsPdf("<h1>Hello world!</h1>")
VB   C#

5. Multi-threading and Async Support

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

  • For enterprise grade multi-threading, use our ChromePdfRenderer in your existing threads and it will work. For web applications this also takes zero setup.
  • For batch processing of HTML to PDF, we recommend using the built in .NET Parallel.ForEach pattern.
  • We love async and have provided Async variants of all of our rendering methods methods such as ChromePdfRenderer.RenderHtmlAsPdfAsync


6. What is next?

From EAP to Production

In the coming months this EAP will go into production and replace the main IronPdf Nuget package. Before we do that we need to:

  • Secure full Linux and MacOS support.
  • Reduce the package size.
  • Get real world user feedback from you. Contact Us with any suggestions or questions.

Features Coming Soon

  • Ultra-Slim deployments, useful for Azure functions and AWS Lambda. We aim to provide deployment options to produce the smallest possible disk footprint.
  • Mobile rendering support: support for iOS and Android app developers.
  • ARM and M1 processor support.
  • IE and Firefox rendering options.
  • Multi-server distributed rendering architectures for large enterprise users.
  • A re-imagined internal PDF document object model to support the widest range of PDF standards. We want to be able to handle reading and automatically fixing corrupted and badly encoded PDF documents elegantly.
  • $"{YourIdeaHere}" Feature requests and bug reports from EAP members go to the top of the stack.