Closed Wang0310 closed 2 years ago
@Wang0310 You are using DocumentBuilder.insertHtml
method. By default content inserted from HTML ignores formatting specified in DocumentBuilder
. You can use another overload of DocumentBuilder.insertHtml
method to set a flag to use DocumentBuilder
formatting:
builder.insertHtml(
"<p align='right'>Paragraph 1.</p>" +
"<p>Paragraph 2.</p>", true);
@AlexNosk thank you. I've confirmed it. It's OK.