iTextSharp 字符 č和ž (Foxit 与 Adobe reader)
我希望有人能帮助我。
我正在编写一些需要打印 pdf 的应用程序。
经过长时间的搜索,我找到了如何正确打印斯洛文尼亚语字符。
我是这样做的:
iTextSharp.text.Font crkeMaleCrneBold =
FontFactory.GetFont(FontFactory.COURIER,
BaseFont.CP1250,
8,
iTextSharp.text.Font.BOLD,
new iTextSharp.text.BaseColor(0, 0, 0));
在 Foxit Reader 上一切都正常,但在 Adobe Reader X 中,当使用 CP1250 时,我会出现交叉方块,当 IDENTITY_H 时,我看到缺少字符。
我认为 PDF 确实获得了所需的字符 č 但 adobe 打印效果不佳。
使用斯洛文尼亚语字符的正确编码是什么?我没有时间用乳胶生成一些来看看那里发生了什么......
I hope someone can help me.
I am writing some application that need to print pdfs.
After long search i found out how to properly print character for Slovenian language.
i did it this way:
iTextSharp.text.Font crkeMaleCrneBold =
FontFactory.GetFont(FontFactory.COURIER,
BaseFont.CP1250,
8,
iTextSharp.text.Font.BOLD,
new iTextSharp.text.BaseColor(0, 0, 0));
Everything works gr8 on Foxit Reader but in Adobe Reader X i se crossed square when using CP1250 and When IDENTITY_H i see missing character..
I think PDF did get the desired character č but adobe doesn't print it well.
What is the proper Encoding to use slovenian character? I don't have time to generate some in latex to see what is happening there...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我再次回答我自己的问题:=)
有一个解决方案适合你们
首先我创建了:(注意.ttf的完整路径,否则会出现错误)
...正如你所见,我使用了 IDENTITY_H 而不是 CP1250
它在福昕阅读器Adobe 阅读器。最后;=)
现在我想我必须将 arial.ttf 放入 bin 文件夹并使用应用程序分发它以确保用户拥有该字体?
或者我必须将它放在 win/font 文件夹中并注册字体才能使用它?
Again I am answering my own question :=)
There is solution for you guys
First I created: (note full path to .ttf, else there is error)
... and as you se i used IDENTITY_H instead of CP1250
It works OK in Foxit & Adobe Reader. Finally ;=)
Now I think I will have to put arial.ttf to bin folder and distibute it with app to make sure user have the font?
Or I have to put it in win/font folder and register font to use it?