-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paginated table header with border-collapse #97
Comments
Hi @Epimetheus89 I'll also try to do a release for you. Thanks for finding the problematic line. From this example: <html>
<head>
<style>
@page {
size: 200px 80px;
margin: 0;
}
table {
-fs-table-paginate: paginate;
border-collapse: collapse;
font-size: 16px;
}
td, th {
border-bottom: 2px solid red;
}
</style>
</head>
<body>
<table>
<thead>
<tr><th>H1</th><th>H2</th></tr>
</thead>
<tbody>
<tr><td>1</td><td>11</td></tr>
<tr><td>2</td><td>12</td></tr>
<tr><td>3</td><td>13</td></tr>
<tr><td>4</td><td>14</td></tr>
<tr><td>5</td><td>15</td></tr>
<tr><td>6</td><td>16</td></tr>
<tr><td>7</td><td>17</td></tr>
<tr><td>8</td><td>18</td></tr>
<tr><td>9</td><td>19</td></tr>
<tr><td>10</td><td>20</td></tr>
</tbody>
</table>
</body>
</html> |
I just tested this with some rather complex multipage tables and it really seems to make no difference, i.e. this change does not break tables which had |
Thanks for fixing this! I also took a look into the implementation and could not explain or think of a scenario in that this line would make any sense. |
Currently using
-fs-table-paginate: paginate;
as css property on a table overwrites theborder-collapse: collapse;
property. This causes the border in a header line to have spaces between the cells:The reason for this can be found in this line:
https://github.com/danfickle/openhtmltopdf/blob/open-dev-v1/openhtmltopdf-core/src/main/java/com/openhtmltopdf/css/style/CalculatedStyle.java#L1152
Is it possible to fix that issue or is there another solution to have collapsed borders in a repeated header row of a table?
The text was updated successfully, but these errors were encountered: