如何在 ReportViewer 类的 PDF 导出中嵌入自定义字体

问题描述

我需要生成一份需要自定义字体的报告。我从 .ttf 文件在服务器上安装了自定义字体。这是我用来导出报告的简化 C# 代码

ReportViewer viewer = new ReportViewer();
viewer.ProcessingMode = ProcessingMode.Local;
viewer.LocalReport.ReportPath = HttpContext.Current.Server.MapPath("SSRS\\Check.rdl");
viewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
byte[] bytes = viewer.LocalReport.Render("PDF",null,out mimeType,out encoding,out extension,out streamIds,out warnings);

当我运行此代码时,自定义字体不会在导出的 PDF 中呈现。有没有人有任何想法?谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)