Page 1 of 1

Spacing for paragraph is not rendered when I open the docx

PostPosted: Fri Aug 07, 2015 7:55 pm
by Lokesh
Hi

As part of my Html to docx conversion,
I need to set the before and after spacing to a paragraph,
even after adding the spacing word is not rendering any space before or after.
It shows up in the wml but no impact when we open the docx.

following is my part of xml
<w:p>
<w:pPr>
<w:pStyle w:val="Title"/>
<w:spacing w:lineRule="atLeast" w:after="60" w:before="30"/>
<w:ind w:left="0"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b/>
<w:color w:val="5f5f5f"/>
<w:sz w:val="36"/>
</w:rPr>
<w:t xml:space="preserve">
Juniper DBBLite Generated Document
</w:t>

Code: Select all
Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
spacing.setLineRule(STLineSpacingRule.AT_LEAST);
spacing.setBefore(new BigInteger("30"));
spacing.setAfter(new BigInteger("60"));
ppr.setSpacing(spacing);



Please let me know if am missing anything.

Regards,
Lokesh

Re: Spacing for paragraph is not rendered when I open the do

PostPosted: Tue Nov 17, 2015 1:35 am
by wbansa
Spacing is measured in twentieth of a point. Your numbers are too small to cause a visible spacing.
Bs