Forum Bugs

Cells that span rows across pages - possible new bug?

halfer
Hi all

We are quite new users to Prince (licensed), and have some of our reporting requirements live with it already. We were until today running 7.1, but have upgraded to 8.0, since we'd encountered the rowspan bug that emerges if a span crosses a page break (from the release notes: "Fixed bug affecting table cells that span rows and break across multiple pages").

However this hasn't fixed it in our case. I think it has something to do with the fact that our printed lines are too thin. We are using this default stylesheet:

/* For the screen, use pixel sizes */
@media screen {
	.report_basic td, .report_basic th {
		border: 1px solid #dddddd;
		padding: 4px;
	}
}

/* For Prince XML, use point sizes - 1px is too wide on paper */
@media print {
	.report_basic td, .report_basic th {
		border: 0.4pt solid #dddddd;
		padding: 4px;
	}
}

This works fine for normal tables, but if we have a rowspan that crosses a page break, the first one is okay as far as I can see, but the second instance is missing its top border. I've found that putting this in, for this report only, fixes the issue:

<?php
/*
 * Hack to fix occasionally missing cell tops when spanning rowspans over
 * pages: 0.5pt doesn't work, 0.6pt works fine.
 */
?>
table.report tr td {
	border-top: 0.6pt solid #dddddd;
}

So, half a point or less looks fine in normal circumstances, but with this spanning issue, that causes issues that need to be repaired manually. Is this a bug, and if so can a fix be included in the next minor point release?

TIA :)
halfer
Actually, the "fix" that I employed doesn't fully solve the problem. I've found, anecdotally only, that it fixes the first instance of the problem, and not a subsequent one. Where it isn't fixed, a row will span across a page break, and the cell underneath it will have its text in the right place, but no border-top. Switching to 1px borders doesn't seem to get rid of the issue entirely, and switching on a table background colour shows that there is no top border (or bottom border of the above cell) being drawn at all.

I can make the XHTML and the PDF available to Prince if this helps dig into it; unfortunately I cannot publish them here, since it isn't my data to publish.
mikeday
Yes, it would be helpful if you could me (mikeday@yeslogic.com) the HTML that demonstrates the problem. Is the table using collapsing borders?
halfer
Hi Mike, thanks.

Apologies for the delayed reply - been tied up somewhat. I will prepare a test case for you and send it, hopefully this week. Indeed, the table is using collapsing borders.