|
@@ -54,7 +54,7 @@ public class PoiService extends ServiceImpl<PatentPledgeMapper, PatentPledge> {
|
|
|
|
|
|
for(int i=1 ;i<ps.size();i++)
|
|
|
{ PoiVO.Pg pg = new PoiVO.Pg();
|
|
|
- if(ps.get(i).getStyle().equals("Word")) {
|
|
|
+ if(ps.get(i).getStyle().equals("word")) {
|
|
|
XWPFRun rh = ps.get(i).getRuns().get(0);
|
|
|
pg.setFontSize(rh.getFontSize());
|
|
|
pg.setFontFamily(rh.getFontFamily());
|
|
@@ -167,16 +167,19 @@ String[] row =org.split("\\|\\|");
|
|
|
FileOutputStream out = new FileOutputStream("C:\\\\BaiduNetdiskDownload\\\\生成\\\\first.docx");
|
|
|
CTSectPr sectPr = doc.getDocument().getBody().addNewSectPr();
|
|
|
XWPFHeaderFooterPolicy policy = new XWPFHeaderFooterPolicy(doc, sectPr);
|
|
|
+
|
|
|
+
|
|
|
+ this.createFooter(doc);
|
|
|
//添加页脚
|
|
|
- CTP ctpFooter = CTP.Factory.newInstance();
|
|
|
- CTR ctrFooter = ctpFooter.addNewR();
|
|
|
- CTText ctFooter = ctrFooter.addNewT();
|
|
|
- String footerText = "ctpFooter";
|
|
|
- ctFooter.setStringValue(footerText);
|
|
|
- XWPFParagraph footerParagraph = new XWPFParagraph(ctpFooter, doc);
|
|
|
- XWPFParagraph[] parsFooter = new XWPFParagraph[1];
|
|
|
- parsFooter[0] = footerParagraph;
|
|
|
- policy.createFooter(XWPFHeaderFooterPolicy.DEFAULT, parsFooter);
|
|
|
+// CTP ctpFooter = CTP.Factory.newInstance();
|
|
|
+// CTR ctrFooter = ctpFooter.addNewR();
|
|
|
+// CTText ctFooter = ctrFooter.addNewT();
|
|
|
+// String footerText = "ctpFooter";
|
|
|
+// ctFooter.setStringValue(footerText);
|
|
|
+// XWPFParagraph footerParagraph = new XWPFParagraph(ctpFooter, doc);
|
|
|
+// XWPFParagraph[] parsFooter = new XWPFParagraph[1];
|
|
|
+// parsFooter[0] = footerParagraph;
|
|
|
+// policy.createFooter(XWPFHeaderFooterPolicy.DEFAULT, parsFooter);
|
|
|
doc.write(out);
|
|
|
out.close();
|
|
|
|