Link to home
Start Free TrialLog in
Avatar of Varun Walia
Varun WaliaFlag for India

asked on

How to read boldItalic font using docx4j?

Hi All,

Is it possible to read "bolditalic" font style using docx4j in java?
like we do getB() and getI().

If we are using both options it's not getting the above property.
Please help.

Thanks.
Avatar of no worries :-) no nothing
no worries :-) no nothing
Flag of Greece image

Use something like

RPr rPr = ((R) XmlUtils.unwrap(paraWR)).getRPr();

Style myStyle = (Style)rPr.getParent();


if( myStyle.getRPr().getI().isVal()){ isItalic = true; }
......
if( myStyle.getRPr().getI().isVal()){ isBold = true; }
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.