Unicode and UTF-8 Text in PDF Generation with IronPDF
The work here is correctness, not conversion. It is what stops Japanese, Arabic, or Thai text becoming empty boxes or garbled mojibake in a generated PDF. Because IronPDF draws on the Chrome engine, any character that displays correctly in a Chrome browser displays correctly in the PDF. The mechanism is small: set RenderingOptions.InputEncoding to UTF-8 and declare the charset in the HTML, so the engine and the document agree on how to read the bytes.
using IronPdf;
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.InputEncoding = System.Text.Encoding.UTF8;
var pdf = renderer.RenderHtmlAsPdf(
"<html><head><meta charset='utf-8'></head><body>こんにちは世界</body></html>");
pdf.SaveAs("utf8.pdf");
using IronPdf;
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.InputEncoding = System.Text.Encoding.UTF8;
var pdf = renderer.RenderHtmlAsPdf(
"<html><head><meta charset='utf-8'></head><body>こんにちは世界</body></html>");
pdf.SaveAs("utf8.pdf");
Imports IronPdf
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.InputEncoding = System.Text.Encoding.UTF8
Dim pdf = renderer.RenderHtmlAsPdf("<html><head><meta charset='utf-8'></head><body>こんにちは世界</body></html>")
pdf.SaveAs("utf8.pdf")
Multilingual and localized documents
This is the everyday case. IronPDF renders non-Latin scripts including Chinese, Japanese, Arabic, Hebrew, Russian, and Thai, plus every other Unicode language. Any app producing invoices, statements, or letters in the customer's own language depends on this for output that actually reads correctly.
Right-to-left and complex scripts
Right-to-left languages like Arabic and Hebrew are handled by the engine, including bidirectional text and contextual letter shaping. That is genuinely hard to get right by hand, so leaning on the browser's text engine removes a whole category of layout bugs.
One document, several languages
Mixed-language documents are supported, so a single PDF can carry multiple scripts at once: a bilingual contract, or a product sheet with parallel translations. The page's own sample renders Japanese, Arabic, and Thai together.
Special symbols and arbitrary input
Beyond full languages, UTF-8 covers currency marks, mathematical symbols, and accented European characters, so a document mixing €, £, ¥, and accented names renders faithfully. This matters most when text arrives from a database, an API, or user submissions: you rarely control the language of the data, only the encoding.
Usually the font, not the encoding
Encoding tells the engine how to read the bytes. The font decides whether the glyph exists. Correct UTF-8 paired with a font that lacks CJK or Arabic glyphs still produces empty boxes. The encoding was never the problem; the missing typeface was.
The reliable fix is to specify a web font in CSS, which IronPDF fully supports:
const string html =
"<html><head><meta charset='utf-8'>" +
"<style>body { font-family: 'Noto Sans JP', sans-serif; }</style>" +
"<link href='https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap' rel='stylesheet'>" +
"</head><body>こんにちは世界</body></html>";
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.InputEncoding = System.Text.Encoding.UTF8;
renderer.RenderHtmlAsPdf(html).SaveAs("utf8-webfont.pdf");
const string html =
"<html><head><meta charset='utf-8'>" +
"<style>body { font-family: 'Noto Sans JP', sans-serif; }</style>" +
"<link href='https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap' rel='stylesheet'>" +
"</head><body>こんにちは世界</body></html>";
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.InputEncoding = System.Text.Encoding.UTF8;
renderer.RenderHtmlAsPdf(html).SaveAs("utf8-webfont.pdf");
Imports System.Text
Const html As String = "<html><head><meta charset='utf-8'>" &
"<style>body { font-family: 'Noto Sans JP', sans-serif; }</style>" &
"<link href='https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap' rel='stylesheet'>" &
"</head><body>こんにちは世界</body></html>"
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.InputEncoding = Encoding.UTF8
renderer.RenderHtmlAsPdf(html).SaveAs("utf8-webfont.pdf")
This is really a deployment problem in disguise. It works on your machine, which has the fonts, and fails in a stripped-down Linux container or serverless function, which does not. If international text renders locally but turns to boxes once deployed, suspect the font before the encoding. A bundled web font, or installing the typeface on the server, fixes it.
Frequently Asked Questions
How do I enable UTF-8 text rendering in IronPDF?
Set renderer.RenderingOptions.InputEncoding = System.Text.Encoding.UTF8 and include <meta charset='utf-8'> in the HTML head. This aligns the Chrome engine and the document on how to interpret the byte stream.
Does IronPDF support right-to-left languages like Arabic and Hebrew?
Yes. IronPDF's Chrome engine handles bidirectional text and contextual letter shaping for RTL scripts, including Arabic and Hebrew, without additional configuration beyond UTF-8 encoding and an appropriate font.
Why does my PDF show empty boxes instead of Japanese or Arabic characters?
The encoding is almost certainly set correctly — the problem is the font. Correct UTF-8 paired with a font that lacks CJK or Arabic glyphs still produces empty boxes. Specify a web font that covers the required scripts (e.g., Noto Sans JP for Japanese) via CSS, or install it on the server.
Can a single IronPDF document contain multiple languages?
Yes. Mixed-language documents are fully supported. A single PDF can render Japanese, Arabic, Thai, and European text together, as long as the font covers all required Unicode blocks.
Why does international text work on my machine but show boxes in production?
Your development machine has system fonts installed. A stripped-down Linux container or serverless function typically does not. Bundle the required web font in your HTML or install the typeface on the server. The encoding is not the issue; the missing font is.

