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 embed unsupported fonts while exporting SfDataGrid to PDF?

Platform: Silverlight |
Control: SfDataGrid

SfDataGrid exports data to PDF using Syncfusion PDF component. By default, some fonts (such as Unicode font) are not supported in PDF. In this case, it is possible to embed the font in PDF document with the help of PdfTrueTypeFont.

Here, you can see how to embed font into the PDF document. In SfDataGrid, you can customize the content that is to be exported into PDF, by using delegate handlers in the PdfExportingOptions.

The following code illustrates how to set the event to ExportingEventHandler delegate of PdfExportingOptions where you can embed Font.


The following code illustrates how to create a font from the resource file and embed into the font of PdfGridCell cell style in WinRT.


In Silverlight, you can render the stream by using GetResourceStream() method to retrieve the font from the resource file and embed into the font of PdfGridCell cell style as illustrated in the following code example.


In the above code, unicode font embeds into PDF. Therefore, exporting the SfDataGrid with Unicode character is exported to PDF correctly.


Figure 1: SfDataGrid

Following is the exported PDF document with Unicode character.

Exported PDF

Figure 2: Exported PDF

Sample link:

You can refer to the following sample links for exporting unsupported fonts from SfDataGrid to PDF document in WPF, WinRT and Silverlight.

WPF: PDFGenerationEuroSymbol_WPF

WRT: PDFGenerationEuroSymbol_WRT

Silverlight: PDFGenerationEuroSymbol_SilverLight




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