openhtmltopdf icon indicating copy to clipboard operation
openhtmltopdf copied to clipboard

Border not collapsing with fixed height table + -fs-table-paginate

Open vdkhvb opened this issue 2 years ago • 1 comments

You can try this one in the sandbox, using this minimal example :

<html>
<head>
<style>
table {
  border-collapse: collapse;
}
</style>
</head>
<body>
<p></p>
<table style="-fs-table-paginate: paginate;page-break-inside: avoid;height:100px;" border="1" cellspacing="0">
<tbody>
<tr><td style="width: 24.6701px;">A1</td><td style="width: 24.6701px;">A2</td></tr>
<tr><td style="width: 24.6701px;">A1</td><td style="width: 24.6701px;">A2</td></tr>
</tbody>
</table>
</body>
</html>

In this example, the border at the bottom is not collapsed. If you remove the paragraph before the table or the fs-table-paginate:paginate styling, the border collapses again. Is there any fix for this?

Since it is also a solution for this particular table; is there a way for this fixed-height table to display the same as it does in a browser, with space evenly distributed over rows?

vdkhvb avatar Jan 04 '23 09:01 vdkhvb

Wrapping the table in a div seems to be one way to circumvent this issue.

vdkhvb avatar Jan 04 '23 10:01 vdkhvb