也许大家和我一样,为了pdf生成时产生中文而苦恼,也许你和我一样,看到别人提供了一堆的jar,而找不到下载的地方,我也是找了好久才找到最后的大本营的,特写出来,方便你我他;)
也算给自己1个多小时的时间的一点见证吧.-_#
你只要去
http://prdownloads.sourceforge.net/itext/
就可以找到所有你想要的东西.包括itext最新版本,itext亚洲语言包
========================
http://prdownloads.sourceforge.net/itext/iTextAsian.jar
===============顺便再补充一下
1 在ireportlib目录下,添加iText亚洲语言包(http://itext.sourceforge.net/downloads/iTextAsian.jar.),itext-1.01.jar;
2 在itext文本的属性框中,设置字体的属性为:
-
font name: SansSerif
-
PDF font name: STSong-Light;
- PDF embedeed encoding前的勾选上
- pdfEncoding :UniGB-UCS2-V (Chinese Simplified)
这样就可以解决了IReport中的PDF中文问题了;) ============
简单的说
Chinese Simplified
STSong-Light with the encodings UniGB-UCS2-H and UniGB-UCS2-V
Chinese traditional
MHei-Medium and MSung-Light with the encodings UniCNS-UCS2-H and UniCNS-UCS2-V
Japanese
HeiseiKakuGo-W5 and HeiseiMin-W3 with the encodings UniJIS-UCS2-H,UniJIS-UCS2-V,UniJIS-UCS2-HW-H and UniJIS-UCS2-HW-V
Korean
HYGoThic-Medium and HYSMyeongJo-Medium with the encodings UniKS-UCS2-H and UniKS-UCS2-V