IRONSOFTWAREHOME

Emojis Not Rendering in IronPDF Using RenderHtmlAsPdf()

Curtis Chau
Curtis Chau
Updated: July 6, 2026

When rendering HTML that contains emoji characters using RenderHtmlAsPdf(), the resulting PDF does not display the emoji characters even though they appear correctly in browser print previews and the HTML is correctly encoded as UTF-8.

RenderHtmlAsPdf() and RenderHtmlFileAsPdf() feed the same embedded Chromium engine, so switching between string and file rendering does not change emoji handling. Emoji are dropped (or rendered as empty boxes) when the rendering host has no emoji-capable font installed, and the problem is made worse when the input encoding is not declared. The fix is to declare UTF-8 encoding and ensure an emoji-capable font is available to the renderer.

Solution

Option 1: Declare UTF-8 input encoding

Set the InputEncoding property on the renderer so the engine interprets the HTML as UTF-8:

using System.Text;

var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.InputEncoding = Encoding.UTF8;

PdfDocument pdf = renderer.RenderHtmlAsPdf(htmlContent);
pdf.SaveAs("output.pdf");
C#

You can also declare the encoding inside the HTML itself with a meta charset tag in the <head>:

<meta charset="UTF-8">
HTML

Option 2: Install an emoji-capable font

Even with correct encoding, emoji only appear if the rendering host has a font that includes emoji glyphs. On servers without a desktop environment (for example, minimal Linux containers), install an emoji font such as Noto Color Emoji and make it available to the renderer. Without an emoji-capable font, the characters render as empty boxes or are dropped from the output.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 20,878,335Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required