Hi. I have a requirement to generate a PDF from a large pre-formatted html file. The html uses page-break-inside: avoid
. Sometimes when a paragraph is too large to fit on the end of a page, instead of moving that whole paragraph to a new page, the paragraph gets split across the page break, with the last part of the paragraph overwriting the text of the next paragraph at the top of the of the next page, leading to garbled illegible text.
screenshot.png (61.6 KB)
A screenshot, example pdf and example code are attached. The example code input is a simplified version of the html document with enough elements to demonstrate the issue. I’m using Aspose.PDF 19.7.0.
ConsoleApp10.zip (7.2 KB)
tmp.pdf (79.3 KB)