Forum How do I...?

inner table

Anonymous
Hi,
when I try to convert a table (which is inside a table row) into pdf with prince, it does not work correctly. The inner table is inside a <tr> tag of the outer table, if the table is longer than one page there is a pagebreak _before_ the table, and then if the 2nd page is over another pagebreak after a table row, that works fine. But if on the first page just a short text, then the rest of the page will remain white and the table starts on 2nd page, even if there would be enough space before. Is this not supportet yet, or how can i realize that?

I hope you understand what I mean and can help me.
mikeday
Prince tries to avoid breaking table cells across multiple pages as much as it can. This is the right behaviour for formatting tabular data, which is what table markup should be used for, as the table cells are usually much smaller than a page and it is undesirable to split them at a page boundary.

However, this can lead to problems in situations in which you have a lot of content nested within a single table cell/row, such as a large table nested within another table cell. (Unfortunately, this kind of table markup is quite commonly used for layout on websites, which usually don't have to worry about page breaking at all).

The worst possible situation for Prince at the moment is a table in which a cell is longer than an entire page, as this leads to the left over blank space that you observed.

The only solution for now is to reduce the use of nested tables, by breaking the content up across several rows or taking the content out of the table altogether. In the future we may tweak the way Prince handles breaking table cells, but it is difficult to ever make it ideal.
Anonymous
Thanks for the answer, I know that tables are a little bit tricky.. I'll try to solve the problem by taking out the inner table.
I'm not sure if you understood me correctly: The page breaking of the inner table works really great, but I want that the table starts on the first page, if there is enough space for some table-rows. So there is no real problem with the page-breaking of the table.
Thanks for your quick answers, thats really great! :)