Prevent page break between 2 table rows in HTML to PDF

When converting HTML to PDF I would like to prevent page break between 2 logically grouped table rows. Here is an example:

<tr>
   <td>1</td>
   <td>2</td>
   <td>3</td>
   <td>4</td>
</tr>
<!-- PAGE BREAK SHOULD NOT HAPPEN HERE -->
<tr class="sub-row">
   <td>5</td>
   <td>6</td>
   <td>7</td>
   <td>8</td>
</tr>

These are 2 table rows, but they relate to the same data and I want to keep them formatted as such. I tried a couple of CSS options, but none of them made any difference. It seems that the engine will only register page-break properties on the paragraph element and I tried inserting a paragraph with the page-break after avoid property before the sub-row and it did not behave as expected either.

Hi,

Paragraph with style=“page-break-after:avoid” should be added in the first table cell of the first table row like in the following HTML snippet:

<tr>
	<td>
		<p style="page-break-after:avoid">1</p>
	</td>
	<td>2</td>
	<td>3</td>
	<td>4</td>
</tr>
<!-- PAGE BREAK SHOULD NOT HAPPEN HERE -->
<tr class="sub-row">
	<td>5</td>
	<td>6</td>
	<td>7</td>
	<td>8</td>
</tr>

If you try to save the DOCX with that same structure (the first paragraph of the first cell has ‘Keep with next’ - this indicates to MS Word that it should keep the entire row with the next row) to HTML using either Microsoft Word or GemBox.Document, the output HTML will have the same structure as this HTML snippet.

Regards,
Stipo