Open 429748372 opened 3 years ago
Hi @429748372,
Table headers should be in a thead
element, something like:
<table>
<thead>
<tr>
<!-- Use colspan to span all columns in table. -->
<th colspan="1">
<div>
<img></img>
<span>this is a header</span>
</div>
</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
You can use css-rule @page
@page {
margin: 10mm;
@top-right {
content: element(head);
}
}
.head{
position: running(head);
}
<div class="head">
<img></img>
<span>this is a header</span>
</div>
<table>
<tr></tr>
<tr>
<td></td>
</tr>
</table>
FYI: If you have a large/complex running header or footer made out tables etc... you need to increase the page's top/bottom margin to accommodate the entire element. I was doing this without setting the margin (and I was testing with no margin!) and so I was seeing nothing...even though the element technically renders--you just can see it because it is off the page.
we want to set a div as a header when we generate pdf. but, the div can not be see in the new page when the table data have more data. example
I have the the table -fs-table-paginate: paginate; -fs-page-break-min-height: 160px;