Can't use page break in HtmlRenderer.PdfSharp ASP.NET Core

735 views Asked by At
<html>
    <body style='margin: 0; padding: 0 50px; font-size: 12px;'>
        <div style='page-break-after: always;'>
            <h1>H1</h1>
        </div>
        <div>
            <h2>H2</h2>
        </div>
    </body>
</html>

I can't use page break in HTML format which will be made into PDF, I've tried various ways but the results don't change, when I use the br tag it works but when entering the style page break it doesn't work.
I want to split the page between h1 and h2

enter image description here

0

There are 0 answers