webreaddoc升级

This commit is contained in:
wangjinlei
2022-06-09 10:23:23 +08:00
parent b32f5dbdaa
commit 1da126dda0

View File

@@ -413,13 +413,11 @@ public class TypesetController {
// FileDownloadUtil.writeFile(response, inputStream);
XWPFDocument xdoc = new XWPFDocument(inputStream);
List<XWPFParagraph> list = xdoc.getParagraphs();
String cache = "";
String cach = "";
for (XWPFParagraph para:list) {
String cache = "";
List<XWPFRun> runs = para.getRuns();
for (XWPFRun r : runs) {
System.out.println("run====>"+r);
String cach = "";
if (r.getText(0) == null) {
continue;
}
@@ -434,14 +432,12 @@ public class TypesetController {
}
cache += cach;
}
al.add(cache);
}
al.add(cache);
} catch (Exception e) {
e.printStackTrace();
}
return new ReturnValue(ReturnCodeAndMsgEnum.Success, al);
}