Here is how you can generate a horizontal line:
Simply add the horizontal line to a P and
ENJOY!!
/**
* Generate a horizontal line
* @return
* @throws JAXBException
*/
public static P generateHorizontalLine() throws JAXBException {
ObjectFactory factory = new ObjectFactory();
P p = factory.createP();
PPr pPr = factory.createPPr();
p.setPPr(pPr);
PPrBase.PBdr bdr = factory.createPPrBasePBdr();
CTBorder bottom = factory.createCTBorder();
pPr.setPBdr(bdr);
bdr.setBottom(bottom);
bottom.setVal( org.docx4j.wml.STBorder.SINGLE );
bottom.setSz( new java.math.BigInteger("6")); //yuck
bottom.setSpace(new java.math.BigInteger("1"));
bottom.setColor("auto");
return p; ...