In apache poi there are methods to make text bold or italic or underline, like I did as below,
textBox.appendText(text, false).setBold(true);
textBox.appendText(text, false).setItalic(true);
textBox.appendText(text, false).setUnderlined(true);
textBox.appendText(text, false).setStrikethrough(true);
But I'm not able to do all the things on the same text like bold and italic and underline:
"Example"
So, how to do that?
CodePudding user response:
Have you tried this:
TextRun run = textBox.appendText(text, false);
run.setBold(true);
run.setItalic(true);
run.setUnderlined(true);
run.setStrikethrough(true);