IRONSOFTWAREHOME
USE CASES

How to Generate Multilingual PDFs with Unicode Text in C#

Curtis Chau
Curtis Chau
Updated: July 5, 2026

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");

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");

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.

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

Related Articles

Key in blue circle

Get your free 30-day Trial Key instantly.

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