Skip to content

Bolded numeration for no reason #366

@acieplinski

Description

@acieplinski

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?

xhtml.txt
image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions