itextitext7pdfhtml

Break a page in iText 7 pdfHTML


I want to break page while converting HTML to PDF using iText 7.


Solution

  • <div style="page-break-after: always">content after this div will flow on the next page</div>
    

    Or

    <div style="page-break-before: always">this div will be started on a new page</div>