jav使用的poi3.16如何对WordExtractor进行设置字体大小

jav使用的poi3.16如何对WordExtractor进行设置字体大小,换行,分页等操作



具体你可以看下文档,这里只是举例

字体大小:

XWPFRun run = paragraph.createRun();
run.setFontSize(12);
run.setText("This is text with font size 12");
换行:

XWPFRun run = paragraph.createRun();
run.setText("This is some text.");
run.addBreak();
run.setText("This is some more text.");
分页:

XWPFRun run = paragraph.createRun();
run.addBreak(BreakType.PAGE);
run.setText("This text is on a new page.");