IText prevent row breaking across multiple pages using XML Worker
<p>we are using iText 5.5.7 with XML Worker and have encountered an issue with long tables where rows that run off the end of the page are split in two over to the next page (see image).</p>

<p>We have tried using <code>page-break-inside:avoid;</code> as suggested in <a href="https://stackoverflow.com/questions/29601081/prevent-page-break-in-text-block-with-itext-xmlworker">Prevent page break in text block with iText, XMLWorker</a> and <a href="https://stackoverflow.com/questions/18512420/itext-cut-between-pages-in-pdf-from-html-table">iText Cut between pages in PDF from HTML table</a> but to no effect.</p>

<p>we have tried</p>

<ul>
<li>wrapping each row in a <code>&lt;tbody&gt;</code> and applying page break avoid (no effect) </li>
<li>targeting <code>tr, td</code> and applying page break (no effect)</li>
<li>wrapping the contents of each <code>td</code> in a <code>div</code> and applying page break (itext stops processing rows once it gets to end of page)</li>
</ul>

<p>We are under the impression <code>page-break-inside:avoid</code> is supported but have yet to see confirmation of this. Is there an example or best practice for creating this effect using XML worker or is the Java api needed to do this level of manipulation?</p>

<p>cheers</p>

<p><em>Rows currently splitting across pages:</em></p>

<p><a href="https://i.stack.imgur.com/frIWS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/frIWS.jpg" alt="Rows are spilling on to the next page (see red outline)"></a></p>

<p><em>Desired effect: Rows with too much data wrap to next page</em>
<a href="https://i.stack.imgur.com/1rPLd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1rPLd.jpg" alt="Desired outcome, rows break to next page if too long (see green outline)"></a></p>