BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hello,
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.Clear();
writer.DataSources.Add(new
ReportDataSource { Name = "Data", Value = PopulateData() });
writer.LoadReport(reportStream);
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:
pdfViewer.Print();
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,
writer.PDFFonts = new Dictionary<string, Stream>(StringComparer.OrdinalIgnoreCase);
writer.PDFFonts.Add("Segoe UI", assembly.GetManifestResourceStream("UWPwriterSample.Assets.Segoe_UI.ttf")); |