The following code would work:
- Code: Select all
org.docx4j.wml.P p = wordMLPackage.getMainDocumentPart()
.addParagraphOfText(null);
org.docx4j.wml.PPr pPr = factory.createPPr();
p.setPPr(pPr);
org.docx4j.wml.PPrBase.PBdr bdr = factory
.createPPrBasePBdr();
org.docx4j.wml.CTBorder bottom = factory.createCTBorder();
pPr.setPBdr(bdr);
bdr.setBottom(bottom);
bottom.setVal(org.docx4j.wml.STBorder.SINGLE);
bottom.setSz(new java.math.BigInteger("6"));
bottom.setSpace(new java.math.BigInteger("1"));
bottom.setColor("auto");
wordMLPackage.getMainDocumentPart()
.addParagraphOfText(null);
But that is very painful to write; and you are only likely to get it right if you are looking at the OpenXML ...