How to read boldItalic font using docx4j?

Varun Walia
Varun Walia used Ask the Experts™
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.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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; }

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial