使用Apache POI在java中读取单词符号列表

时间:2015-07-15 04:42:09

标签: apache-poi

我正在尝试使用apache poi在java中读取Word文档,但是当它遇到MS字符号列表中的符号时,它在字符串中显示为空格。以下是我正在使用的代码

WPFDocument doc = new XWPFDocument(new FileInputStream(fileName));
          XWPFWordExtractor ex = new XWPFWordExtractor(doc);
          List<XWPFParagraph> xwpfParagraphs=doc.getParagraphs();
          for(XWPFParagraph xwpfParagraph:xwpfParagraphs)
          {
              System.out.println("paragraph");
              System.out.println(xwpfParagraph.getParagraphText());
          }

0 个答案:

没有答案