Category / Section
How to export report with Unicode fonts to PDF in ReportViewer
1 min read
WinRT ReportViewer does not have direct support for Exporting Unicode text to PDF. As WinRT does not provide access to installed font data, Unicode fonts cannot be embedded directly. Instead, the Unicode font files can be added as an embedded resource to the application. The Unicode font streams need to be added to the ReportViewer’s PDFFonts collection to export report as PDF format with Unicode fonts as shown in the below code snippet.
C#
ReportViewer.PDFFonts = new Dictionary<string, Stream>(StringComparer.OrdinalIgnoreCase); ReportViewer.PDFFonts.Add("MS Mincho", assembly.GetManifestResourceStream("WinRTSampleApplication.Assets.msmincho.ttf"));
Sample Link: