Having an issue when converting a HTML page to a PDF using NReco, where div's with the style 'page-break-before:always;' will not leave a page break when it's converted to a PDF.
Below is the code that actually converts the html to PDF
var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter();
var pdfBytes = htmlToPdf.GeneratePdf(htmlContent);
Response.ContentType = "Application/pdf";
Response.BinaryWrite(pdfBytes);
Response.End();
Below is a segment of HTML
</div>
<div>
<h3 style="page-break-before:always;">
Forsikringsbevis fortsat
</h3>
<!-- Second large table -->
<div>
Below is a screenshot of the pdf without the pagebreak.
I figure that for some reason the CSS isn't getting picked up, however other CSS is being displayed on the page, like the colouring for example.
Any ideas?