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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Printing PDF from RDLC changes font

Thread ID:





124904 Jul 7,2016 03:13 PM UTC Jul 11,2016 09:58 AM UTC UWP 3
Tags: SfPdfViewer
Michael Woolsey
Asked On July 7, 2016 03:13 PM UTC



I am printing from a RDLC report and the font selected, Segoe UI, is actually printing in Times New Roman.  I've attached some screenshots to illustrate the issue.


The pdfViewer variable is a SfPdfViewerControl object.


This is the code I use to generate the PDF:

            Assembly assembly = typeof(ResultsPage).GetTypeInfo().Assembly;

            Stream reportStream = assembly.GetManifestResourceStream("Report.rdlc");

            ReportWriter writer = new ReportWriter();

            writer.ReportProcessingMode = Syncfusion.ReportWriter.ProcessingMode.Local;


            writer.DataSources.Add(new ReportDataSource { Name = "Data", Value = PopulateData() });



            MemoryStream stream = new MemoryStream();

            writer.Save(stream, WriterFormat.PDF);


            // A zero length stream just causes the LoadDocument to hang.

            if (stream.Length > 0)


                await pdfViewer.LoadDocumentAsync(new PdfLoadedDocument(stream));



This is the code I use to print the pdf:



Any idea how to get my print outs to actually print in the Segoe UI font I have selected instead of Times New Roman?


Thank you,


Attachment: Issue_Files_b5a312f5.zip

Praveena P [Syncfusion]
Replied On July 8, 2016 12:16 PM UTC

Hi Michael, 
As UWP platform does not provide access to the installed font data in the system, Unicode fonts such as “Segoe UI” cannot be embedded directly in exported PDF document. Hence need to add required Unicode font files as an embedded resource to the document for the display and print of text using the appropriate font. The Unicode font streams need to be added to the Report Writer’s PDF Fonts collection to export report as PDF format with Unicode fonts as shown in the below code snippet.  

writer.PDFFonts = new Dictionary<stringStream>(StringComparer.OrdinalIgnoreCase);  
writer.PDFFonts.Add("Segoe UI", assembly.GetManifestResourceStream("UWPwriterSample.Assets.Segoe_UI.ttf"));  
Please find the sample attached in the below link which illustrates how to add required Unicode font files as an embedded resource to the application. 
And also attached printed output document in OXPS format which contains Segoe UI font printed using PdfViewer and it displays as Segoe UI font. 
Please let me know if you have any concerns. 

Michael Woolsey
Replied On July 8, 2016 02:07 PM UTC


That works well!

Thank you,

Praveena P [Syncfusion]
Replied On July 11, 2016 09:58 AM UTC

Hi Michael , 
We are glad to know that your issue has been resolved. Please let us know if you need any further assistance.    


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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