We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display unicode text in Pdf WinRt

Platform: WinRT |
Control: PDF
Tags: pdf, fonts

Essential PDF does not provide direct support for rendering Unicode text in WinRT platform. As WinRT does not provide access to installed font data, Unicode fonts cannot be embedded directly. Instead, the font file can be added as an embedded resource to the application, from where it can be embedded in the PDF Document.

You can use the PdfTrueTypeFont to display the Unicode font in the PDF, Please refer the below code snippet.

Assembly assembly = typeof(MainPage).GetTypeInfo().Assembly;
//Gettin the fontdata
Stream fontData = assembly.GetManifestResourceStream("PdfUnicodeFontSample.Assets.arial.ttf");
//creating the docuement
PdfDocument document = new PdfDocument();
PdfPage page = document.Pages.Add();
//creating the true type font
PdfTrueTypeFont font = new PdfTrueTypeFont(fontData, 20);
//drawing the string
page.Graphics.DrawString("Sample@#% unicode test%3^*", font, PdfBrushes.Red, 0, 0);
MemoryStream stream = new MemoryStream();
//saving the document



The below sample shows how to add a font file as embedded resource and how the Unicode text can be drawn to the PDF document.


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile