pdfsharp xfont OCR-B-10 BT works locally but not on server

随声附和 提交于 2019-12-25 15:54:09

问题


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);

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.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/27893857/pdfsharp-xfont-ocr-b-10-bt-works-locally-but-not-on-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!