pdfsharp xfont OCR-B-10 BT在本地工作,但不能在服务器上工作 [英] pdfsharp xfont OCR-B-10 BT works locally but not on server

查看:106
本文介绍了pdfsharp xfont OCR-B-10 BT在本地工作,但不能在服务器上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Web应用程序中使用pdfsharp创建pdf文档.这些文档需要使用OCR-B-10 BT字体. 在代码中,我创建了一个新的字体对象,如下所示:

I use pdfsharp in my web app to create pdf documents. These documents need to have OCR-B-10 BT font. In the code i create a new font object as follows:

XFont font = new XFont("OCR-B-10 BT", 13, XFontStyle.Regular);

现在,当我在工作PC(Windows 7)上运行代码时,它可以正常工作而没有任何问题.但是,在我的服务器(Windows Server 2008标准版)上,它使用默认字体创建文档.

Now when i run the code on my work pc (windows 7), it works fine no problems there. However on my server (windows server 2008 standard), it creates documents using the default font.

在两台计算机上,我在c:/windows/fonts中都安装了ocrb10n_0.ttf.

on both machines, i have ocrb10n_0.ttf installed in c:/windows/fonts.

有什么想法为什么要使用默认字体而不是我需要的默认字体?

Any ideas why the default font is being used and not the one i need?

谢谢.

推荐答案

感谢此答案

Thanks to this answer here, i found out it was because that particular font did not have sufficient permissions for the 'users' group. I gave full control privileges to the user group for the font and the problem got solved.

这篇关于pdfsharp xfont OCR-B-10 BT在本地工作,但不能在服务器上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆