Forum How do I...?

Page Break Question

jhoweaa
I'm having some issues using the page-break-inside control and I'm wondering if there are some things I can do to eliminate the problems that I'm seeing.

I'm displaying some data in a table. The table looks sort of like this:

<table>
<tbody>
<tr>
<td>... some date ...</td>
<td>... some heading ...</td>
</tr>
<tr>
<td>... some stuff ...</td>
<td>... some potentially long series of paragraphs ...</td>
</tr>
<tbody>
... repeats ...
</table>

Ideally I would like to keep all of the data in the <tbody> section together. I set up a style for my tbody which used page-break-inside: avoid. When my paragraph content was reasonably short I got the behavior I wanted. If a new tbody would span a page, it would move to the next page. However, when I had some really large content in my second row, something more than a page, I would end up getting a blank page before the data would show up. Ideally what I would like to happen in this case is if the content was too large, I would like to have the content break after the first paragraph. Is there anything else I can put in the markup which would help Prince deal with the pagination of large blocks of content like this?

Thanks!
mikeday
In general that's a bit tricky, as there is a dividing line between a short tbody that you want to keep together, and a long tbody that you want to split after the first paragraph in the second row, and CSS page break properties are not subtle enough to express that.

Perhaps the closest attempt would be to use "page-break-after: avoid" to keep the first row attached to the second row, and then allow the second row to split?
jhoweaa
Thanks for the suggestion. I'll give that a try.