Problem when create a new numbered list
Posted: Mon Jul 17, 2017 7:55 pm
Hi,
I want to create a new numbered list, visually it's work fine but it doesn't appear in the numbering.xml part of my docx (in attachment) when I unzip it so it's cause trouble whit my pdf converter (it's not the pdf converter of docx4j).
I create my list like that:
Anyone know how t oadd my list in the numbering.xml ?
I want to create a new numbered list, visually it's work fine but it doesn't appear in the numbering.xml part of my docx (in attachment) when I unzip it so it's cause trouble whit my pdf converter (it's not the pdf converter of docx4j).
I create my list like that:
- Code: Select all
PPr pprList = factory.createPPr();
NumPr numprList = factory.createPPrBaseNumPr();
Ilvl ilvlList = factory.createPPrBaseNumPrIlvl();
NumId numidList = factory.createPPrBaseNumPrNumId();
R rList = factory.createR();
Text textList = factory.createText();
rList.setRPr(this.runProperties);
pprList = this.paragraphStyle;
ilvlList.setVal(BigInteger.valueOf(1));
numidList.setVal(BigInteger.valueOf(numberList));
numprList.setIlvl(ilvlList);
numprList.setNumId(numidList);
pprList.setNumPr(numprList);
PStyle listStyle = new PStyle();
listStyle.setVal("ListParagraph");
pprList.setPStyle(listStyle);
pList.setPPr(pprList);
textList.setValue("test");
rList.getContent().add(textList); \\My rList it's a run which contains the list
Anyone know how t oadd my list in the numbering.xml ?