为什么有些字体(例如code 128)与PDFsharp生成PDF文件时,在本地服务器上,但无法正常工作 [英] Why some fonts (e.g. Code 128) work locally but not in server when generating pdf file with PDFsharp

查看:619
本文介绍了为什么有些字体(例如code 128)与PDFsharp生成PDF文件时,在本地服务器上,但无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一些标签与PDFsharp(使用ASP.Net + VB)和一切工作在我的开发PC OK:PDF文件显示正确,我选择大小和字体(code 128,为酒吧codeS,和Arial。展位是TTF)。

I'm creating some labels with PDFsharp (using ASP.Net+VB) and everything works OK in my development PC: the PDF file shows correctly the sizes and fonts I choose (Code 128, for barcodes, and Arial. Booth are ttf).

在发布code到服务器生成的PDF显示 Microsoft无MS 而不是 $ C $的ç128 。在服务器上生成PDF和下载到客户端(我的电脑),我看不到了吧codeS在生成的PDF既不在服务器还是在客户端。

When publishing the code to the server the generated PDF shows Microsoft Sans MS instead of Code 128. The pdf is being generated in the server and downloaded to the client (My PC), and I can't see the bar codes in generated PDF neither in server nor in client.

我敢肯定的字体是安装在服务器中,我的本地PC(我可以打开MS Word文档,并使用该字体)。

I'm sure the font is installed in the Server and my local PC (I can open a MS Word Document and use the font).

Private loFuenteCode128 As XFont = New XFont("Code 128", 26, XFontStyle.Regular)

在我看来,这个问题是在某处的服务器(Windows 2008中)。

It looks to me that the problem is somewhere in the server (Windows 2008).

推荐答案

我发现这个问题(种):我只是给总权的字体 code 128 用户的组(是的,我知道,我有急事......),并重新启动服务器(因为我安装的字体我没有重新启动)。我不知道什么固定的问题,但我现在已经转移到另一个问题。

I Found the problem (kind of): I just gave total rights to the font Code 128 to the users group (yes I know, I'm in a hurry...) and restarted the server (I hadn't restarted since I installed the font). I'm not sure what fixed the problem but I have to move to another issue now.

有些事情别人:对一些窗口字体的原始问题举行(在本地PC和两个不同的服务器测试),例如:我可以使用宋体,而不是快递。我尝试了一些字体,它看起来像我可以使用使用样式字体(我的意思是:那些包括定期和至少另一种风格的TTF文件);但是当我试图字体,只有正规的风格它打印 Microsoft无MS 来代替。我离开这里,以防别人可以受益于我的发现:)

Some thing else: The original problem holds for "some" windows fonts (tested in local PC and two different servers), for example: I can use Courier New, but not Courier. I tried some fonts and it looks like I can use "fonts with styles" (I mean: those which include regular and at least another style in the ttf file); but when I try fonts that only have "regular" style it prints Microsoft Sans MS instead. I leave it here in case somebody else can benefits from my findings :)

这篇关于为什么有些字体(例如code 128)与PDFsharp生成PDF文件时,在本地服务器上,但无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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