SQL Server 2005 Reporting Services中的自定义字体

时间:2020-03-05 18:41:24  来源:igfitidea点击:

我的SQL Reporting Services报表有问题。我为报表标题使用了自定义字体,并且在部署到服务器时,当我打印或者导出为PDF / TIFF时,它无法正确呈现。我已经在服务器上安装了字体。为了使用自定义字体,我还有什么需要做的吗?

在浏览器中查看字体时,它看起来是正确的,因为所有客户端计算机都已安装了字体...

感谢Ryan,我们在FAQ上的帖子解决了该问题。在服务器上安装字体可以解决打印问题以及图表问题(图表也出现在服务器上)。就像我们指出的那样(以及在FAQ中提到),Reporting Services 2005不会在PDF文件中嵌入字体。我想现在还可以,最重要的部分是能够打印并获得正确的字体。

常见问题解答中回答了字体没有立即显示的原因:

Q: I've installed the font on my client/server but I still see ?'s or
  black boxes. Why? A: For the client
  machine, closing all instances of the
  PDF viewer then reopening them should
  fix the issue.
  
  For the server, restarting the
  services should allow the PDF renderer
  to pick up the new font information.
  
  Unfortunately, I have also seen times
  where I needed a full machine reboot
  to get the client/server to recognize
  the newly installed font.

解决方案

回答

与许多PDF文件一样,由SSRS提供的PDF文件也具有嵌入的脚本字体。因此,在转换时,报表中使用的本地字体将转换为最匹配的Postscript字体,因此PDF完全可移植,而无需依赖本地安装的字体。

我们可以在此处查看SSRS PDF导出的官方MS准则和字体要求:SQL Server 2005联机丛书(2007年9月)设计用于PDF输出。此外,该帖子也应提供一些帮助:报告服务:PDF Renderer常见问题解答

显然,Aspose还拥有一个声称可以在SQL Report PDF中添加自定义嵌入字体的组件。

请参阅Aspose.Pdf for Reporting Services

Aspose.Pdf for Reporting Services
  makes it possible generating PDF
  reports in Microsoft SQL Server 2000
  and 2005 Reporting Services. Some
  advanced features like XMP metadata,
  custom embedded font and rendering
  watermark for pages are now supported.
  All RDL report features including
  sections, images, charts, tables,
  matrices, headers and footers are
  converted with the highest degree of
  precision to PDF.

我没有尝试过此组件,所以我只能分享它声称能够执行的操作。

回答

由于我们无法在PDF导出中包含条形码字体,因此我们必须安装NeoDynamic条形码软件以将条形码呈现为图像。

回答

我已将条形码字体成功用于SSRS和PDF。我们必须在服务器(用于从浏览器进行渲染和查看)以及客户端上都安装字体。

使用条形码字体时,邮戳实际上并没有最佳的"匹配项",因此PDF不会在文档中嵌入有效的条形码字体,而这只会产生大量垃圾文本。要解决此问题,只需在将要查看PDF的客户端计算机上安装字体。

回答

注意:我发现在Reporting Services服务器上安装字体时,可能需要:

=实际上是从"字体"控制面板中打开字体,因此我们可以看到预览

=重新启动服务器盒。

是的,我同意我们不需要这样做,但是我已经看到了它的工作原理。