danfickle / danfickle/openhtmltopdf
no repetition of table header using -fs-table-paginate and a page-break-after: avoid with a div like table
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 423
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
We are using a div like table and we have an issue rendering the table header using -fs-table-paginate when a page break occurs between table rows.
The table header on the following page is not displayed but its height is accounted and the next row seems blended with the missing header.
Here is a sample so you can test it
```
test
.divTable{
display: table;
width: 100%;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
}
.divTableCell, .divTableHead {
border: 1px solid #999999;
display: table-cell;
padding: 3px 10px;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
font-weight: bold;
}
.divTableFoot {
background-color: #EEE;
display: table-footer-group;
font-weight: bold;
}
.divTableBody {
display: table-row-group;
}
.tableList
{
width:700px;
table-layout:fixed;
text-align:center !important;
vertical-align:middle !important
}
```
It seems "-fs-table-paginate: paginate" doesn't like "page-break-after: avoid".
Is it a bug? inherited from flying saucer?
FYI, in our project, we can't easily predict where the page-break is needed from java code since it's depending on the height of the row, which is dynamically set. We can't use -fs-page-break-min-height on the table.
Can you reproduce this bug ? Do you have a workaround ?
How it renders :

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.