2007年11月28日
在java 中用 DynamicPDF 能支持中文嗎?
最近再用DynamicPDF 組件輸出pdf格式的報表.但是中文編碼后就被過濾了.誰遇到過這個問題并且解決的請回答.
不懂的請不好回答.謝謝
問題補充:過濾的意思是中文直接不顯示了
設置了
response.setContentType("application/pdf;charset=gb2312");
中文處理成這樣
String test = bean.getField(j).toString();
if(test==null)test="";
String str = new String(test.getBytes("ISO-8859-1"),
"gb2312");
Cell cell = cellList.add(str);
posted on 2007-11-28 17:28
charlie 閱讀(261)
評論(0) 編輯 收藏