-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
Description
Hello,
I found some weird behaviour when I generate PDF with 2 or more pages. When there's a bold word (in < strong> tags, as you can see '< strong>expedita< /strong>' in my attachment) in the last line of the page, then numeration on the next page is bold as well (it shouldn't be as there's a < /strong>)
This is my code:
public void htmlToPdf(OutputStream outputStream, String htmlString) {
try {
PdfRendererBuilder builder = new PdfRendererBuilder();
String xhtml = convertToXhtml(htmlString);
builder.withHtmlContent(xhtml, "");
builder.toStream(outputStream);
builder.run();
} catch (Exception e) {
e.printStackTrace();
}
}
There's a 'convertToXhtml' method, I attached xhtml.txt so you can review what is put into 'withHtmlContent(...)'
Have you met that problem? Any idea if I can avoid rendering pdf that way?
