danfickle / danfickle/openhtmltopdf

no repetition of table header using -fs-table-paginate and a page-break-after: avoid with a div like table

Open
#438 2 comments 1 reaction 0 assignees View on GitHub
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
}




titre1

titre2

titre3




a

z

e



y

t

r



u

i

o



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



y

t

r



u

i

o



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e




a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



a

z

e



Titre

z

e



a

z

e




```

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 :
![image](https://user-images.githubusercontent.com/1208369/73341753-8fda1200-427d-11ea-83aa-4f2bbe047564.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.