找回密码
 立即注册

QQ登录

只需一步,快速开始

fumasoft

高级会员

128

主题

346

帖子

1106

积分

高级会员

积分
1106
fumasoft
高级会员   /  发表于:2024-1-2 13:39  /   查看:1076  /  回复:1
1金币


模版预览效果正常;

导出pdf后,文字效果异常,部分文字自动加粗。
附件中是模版文件。
pdf导出时,不管用下面两种方式的哪一种,导出效果都是一样的:

if (Reportname.Contains("1574752"))
                                    {
                                        DirectoryInfo outputDirectory = new DirectoryInfo(HttpRuntime.AppDomainAppPath + "temFile\\");
                                        GrapeCity.ActiveReports.Export.Pdf.Page.Settings pdfSetting = new GrapeCity.ActiveReports.Export.Pdf.Page.Settings();

                                        GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension pdfRenderingExtension = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();
                                        GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, FileName);
                                        outputProvider.OverwriteOutputFile = true;
                                        rpt.Document.Render(pdfRenderingExtension, outputProvider, pdfSetting);
                                    }
                                    else
                                        pdf.Export(rpt.Document, reportPath);  

附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

您好,下载查看了您的报表,发现您截图的红色框的字体使用的都是"Times New Roman",这个字体本身就不支持中文,建议您更换字体,其次要保证对应的机器也要安装对应的字体问题,这样导出的pdf打开才是正常的。

1 个回复

倒序浏览
最佳答案
最佳答案
Bella.YuanWyn认证
超级版主   /  发表于:2024-1-2 13:39:13
来自 2#
您好,下载查看了您的报表,发现您截图的红色框的字体使用的都是"Times New Roman",这个字体本身就不支持中文,建议您更换字体,其次要保证对应的机器也要安装对应的字体问题,这样导出的pdf打开才是正常的。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部