试试:
String cnStr = "中文显示";
cnStr = new String(cnStr.getBytes("GB2312"));

cnStr = new String(cnStr.getBytes("iso-8859-1"),"GB2312");

解决方案 »

  1.   

    肯定不行,在java生成pdf文件的时候是不任这个gb2312的,跟平常转数据库不一样的。
      

  2.   

    .....
            Table aTable = new Table(2, 2);
            float[] intheaderwidths = { 18, 18};
            aTable.setWidths(intheaderwidths);
            aTable.setWidth(36);
            BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", false);
            Font FontChinese = new Font(bfChinese, 12, Font.NORMAL);
            Phrase ph = new Phrase("中文显示", FontChinese);
            Cell cell = new Cell(ph);
            aTable.addCell(cell);
    ......
      

  3.   

    是你的FONT 的事,他对亚洲文字有特殊的字体显示的方法。看看iText的指南上关于字体的一章有详细的说明。用这个试试
    BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
      

  4.   

    我同意lirc的意见,我以前也这么解决的,它好像好友一种解决办法,我是在itext的网站上找到的。http://www.lowagie.com/iText/index.html