当使用xslf转换 pptx 2007格式怎么编码呢?直接转中文乱码!


代码1:

   
  // ####hslf 支持中文####
  
TextRun[] truns = slide[i].getTextRuns();
String title = slide[i].getTitle();
for (int k = 0; k < truns.length; k++) {
RichTextRun[] rtruns = truns[k].getRichTextRuns();
for (int l = 0; l < rtruns.length; l++) {
int index = rtruns[l].getFontIndex();
String name = rtruns[l].getFontName();
rtruns[l].setFontIndex(1);
rtruns[l].setFontName("宋体");
// System.out.println(rtruns[l].getText());
}
}

各位大牛,
使用apache poi hslf转换 ppt 97-03格式中文编码可以这样:代码1.
当使用xslf转换 pptx 2007格式怎么编码呢?直接转中文乱码!

java apache

Actury 11 years, 5 months ago

Your Answer