I am trying to generate a word document from scratch using Docx4j. I was able to generate tables, content within tables. Now I am trying to display the content within the table as BULLET points in the below attached format.
I am using the below mentioned code.
- Code: Select all
public static P getTaskWithBulletin(String tempStr, ObjectFactory factory){
P p = factory.createP();
PPr ppr = factory.createPPr();
PStyle pstyle = factory.createPPrBasePStyle();
NumPr numpr = factory.createPPrBaseNumPr();
NumId numIdElement = factory.createPPrBaseNumPrNumId();
numpr.setNumId(numIdElement);
numpr.getNumId().setVal(BigInteger.valueOf(0));
// The <w:ilvl> element
Ilvl ilvlElement = factory.createPPrBaseNumPrIlvl();
numpr.setIlvl(ilvlElement);
numpr.getIlvl().setVal(BigInteger.valueOf(0));
ppr.setNumPr(numpr);
pstyle.setVal("ListParagraph");
ppr.setPStyle(pstyle);
p.setPPr(ppr);
org.docx4j.wml.Text t = factory.createText();
t.setValue(tempStr);
org.docx4j.wml.R run = factory.createR();
run.getContent().add(t);
p.getContent().add(run);
return p;
}
But I am NOT getting the bullet Points. I DONT want bullet points to be numbered as 1 , 2 , 3.
Kindly Help.
Thanks
Vijay