Hey, Please find my code below
LayoutCollector lc = new LayoutCollector(doc);
for (Paragraph para : paragraphs) {
if (lc.getStartPageIndex(para) > pageNumber || para.isEndOfDocument()) {
// some action
}
}
Here, lc.getStartPageIndex(para) s throwing Null Pointer Exception, i also tried evaluating lc.getStartPageIndex(paragraphs.get(0)) and lc.getStartPageIndex(paragraphs.get(1)) … etc
Every time when i evaluate first, it throws exception, but when i re-evaluate the same line it works fine.
It Does not happen with all the document.
PFAoriginal-upload (22).docx (6.5 MB)