Ok, I'm confused.
When I have the following code, the <h2> appears on the second PDF page followed by the table.
<p>text</p>
<h2>Heading Text</h2>
<table>Table</table>
Note: The <h2> can be any heading level.
But when I have
<p>text</p>
<h2>Heading Text</h2>
<p>text</p>
<table>Table</table>
Then the pages flow perfectly without a page break.
I have added the Page Break avoid to the CSS in case that was the problem. Didn't fix the issue.
Why?