Summary: | createWaterMark IndexOutOfBoundException | ||
---|---|---|---|
Product: | POI | Reporter: | xiaoting233zhang |
Component: | XWPF | Assignee: | POI Developers List <dev> |
Status: | NEEDINFO --- | ||
Severity: | normal | CC: | ichonham |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | This is my implementation of watermarking, including watermarked service and watermarked ServiceImpl |
Description
xiaoting233zhang
2020-04-14 08:16:32 UTC
(In reply to xiaoting233zhang from comment #0) > Caused by: java.lang.IndexOutOfBoundsException > ┣ at > org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTBodyImpl. > getPArray(Unknown Source:26) > ┣ at > org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy. > getWatermarkParagraph(XWPFHeaderFooterPolicy.java:432) > ┣ at > org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy. > createWatermark(XWPFHeaderFooterPolicy.java:418) > > This happens when the document has nothing. Hi, this problem caused by missing paragraph. Currently you can first create a paragraph to avoid this problem. Can you provide a small sample document and sample code which reproduces this so we can add a test-case for it. Created attachment 37473 [details]
This is my implementation of watermarking, including watermarked service and watermarked ServiceImpl
|