linkedinfacebooktwittermenuarrow-up

GemBox Support Forum

Coverting HTML to PDF in that <table style="page-break-after: always"> property not wokring

Hi Team,
I am adding <table style="page-break-after: always"> in HTML but not working while converting html to PDF using Gembox.document.

Thanks

Hi,

Yes, page-break-after: always won’t work on tables, try using it on paragraphs.

Regards,
Mario

is there any way to add paragraph in HTML ?

<p style="page-break-after: always">...</p>

I just tried below code but not working

<html>
<body>

<h1>The  element</h1>

<p style="page-break-after: always">This is a paragraph.</p>
<p style="page-break-after: always">THis 2nd paragraph </p>
<p style="page-break-after: always">THis 3rd paragraph </p>

</body>
</html>

Can you try this:

<html>
<body>

<h1>The  element</h1>

<p style="page-break-before: always">This is 1st paragraph.</p>
<p style="page-break-before: always">This is 2nd paragraph.</p>
<p style="page-break-before: always">This is 3rd paragraph.</p>

</body>
</html>

Does this work for you?