要下載iTextAsian.jar
地址: http://prdownloads.sourceforge.net/itext/iTextAsian.jar?download
import com.lowagie.text.Font;
import com.lowagie.text.pdf.BaseFont;
BaseFont?bfChinese?=?BaseFont.createFont("STSong-Light",??"UniGB-UCS2-H",?BaseFont.NOT_EMBEDDED);
Font?FontChinese?=?new?Font(bfChinese,?12,?Font.NORMAL);
加入document:
Paragraph?chunk?=?new?Paragraph("中文",?FontChinese);
document.add(chunk);
posted on 2007-03-21 19:52
流浪汗 閱讀(676)
評論(0) 編輯 收藏 所屬分類:
JAVA/J2EE