I am creating a Word document with Apache poi library. The whole document has only 1 paragraph. The styles and fonts are implemented with the help of different runs (XWPFRun). Things were all okay until I encountered a requirement with bullet points. Under a header I need to write few points with bullets. The problem is if I create a new paragraph for the bullets then the format of the document will be affected. Therefore I am not able to use paragraph.setNumID(numID)
for the bullet points. I have to create a seperate runner (XWPFRun) and add the bullet points. In the picture below the same requirement has been shown.
I did the following but I could not implement the bullet points :-
XWPFRun run38=paragraph.createRun();
run38.setText("Same paragraph different run:");
run38.setBold(true);
run38.addBreak();
XWPFRun run39=paragraph.createRun();
for(int u=0;u<array.getArrayValue().length;u++){
run39.setText(array.getArrayValue()[u]);
run39.addBreak();
The array contains the values - XWPFRun run1 and XWPFRun run2