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?
Have you tried this:
TextRun run = textBox.appendText(text, false);
run.setBold(true);
run.setItalic(true);
run.setUnderlined(true);
run.setStrikethrough(true);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.