// First up, all our paragraph based text
Iterator<XWPFParagraph> i = document.getParagraphsIterator();
while(i.hasNext()) {
XWPFParagraphDecorator decorator = new XWPFCommentsDecorator(
new XWPFHyperlinkDecorator(i.next(), null, fetchHyperlinks));
text.append(decorator.getText()+"\n");
}
// Then our table based text
Iterator<XWPFTable> j = document.getTablesIterator();