简体   繁体   中英

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM