[Html2PdfConverter] How to add page break in HTML2PDF

Forge Component
Published on 17 May by Guilherme Pereira
60 votes
Published on 17 May by Guilherme Pereira

Hi Guys,

I follow all the discussion about using page break but I couldn't make it work.

My goal is to print the border red below on the second page. Please see the screen shot below :

I already add the below CSS on the div that I want to print on the second page but it is not working :

.nobreak {

    page-break-inside: avoid;


Also I add the above CSS on div with the value of “Page 2” but it is not working.

Thanks for advance in any help and suggestion.



If that's a table, you may need to use the CSS page-break-inside.

Take a look at this: https://stackoverflow.com/questions/8712677/how-to-apply-css-page-break-to-print-a-table-with-lots-of-rows

Hi Joao,

Thanks for the reply. Currently I'm using container (div) to build the tabular data inside a list. 

I already try page-break-inside, page-break-before, page-break-after but couldn't make it work.



Just additional information. I try to create a simple HTML and apply the "page-break-before:always" and it work when I print using the HTML2PDF component. I also apply the same css but it is not working on the OutSystems web screen. 

Any ideas on how can I solve the problem that Im experiencing.