用 itextsharp 制作PDF文件的时候发生错误

Font 'd:\SIMSUN.TTC' with 'Identity-H' is not recognized.

原本是 

BaseFont baseFT = BaseFont.CreateFont("d:\SIMSUN.TTC", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

应修改为: 

, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

在字体路径的后面加了一个“,0”解决了,虽然不知道为什么,但是猜测这个是字体组有关,因为雅黑有三种,常规、加粗、极细

 

原文:http://blog.csdn.net/witch_soya/article/details/8426857

相关文章:

  • 2021-04-07
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-28
  • 2022-03-05
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案