Page 1 of 1

How to change the font size style of a paragraph in docx?

PostPosted: Fri Oct 31, 2014 4:40 pm
by pb1060
How to change the font size and style of a paragraph in docx file. Actually i am just taking docx file as a input and want to change the font size, fontstyle of a paragraph?
Thanks in advance....

Re: How to change the font size style of a paragraph in docx

PostPosted: Fri Oct 31, 2014 6:50 pm
by jason
What have you tried?

Re: How to change the font size style of a paragraph in docx

PostPosted: Fri Oct 31, 2014 7:42 pm
by pb1060
Thanks for the reply Jason ...
I have got the solution for the font size but would like to get some help on line spacing. I want line spacing to Double

PPr ppr=factory.createPPr();
PPrBase.Spacing pprbasespacing = factory.createPPrBaseSpacing();
ppr.setSpacing(pprbasespacing);
pprbasespacing.setLine( BigInteger.valueOf( 240) );
pprbasespacing.setLineRule(org.docx4j.wml.STLineSpacingRule.AUTO);


Thanks..