'flyingsaucer/itext - is it possible to have table header on each PDF page
I have an HTML file which converted into PDF file with 5+ pages (a4 size) almost all pages it's a big table which created using DIVs the problem is that the table header is present only on the first page, but I want to have it on each page where the table present.
Is there any way how to add repeating table header on each page?
Solution 1:[1]
If you're using a table, you can use the following CSS style, which will repeat thead on each page.
table {
-fs-table-paginate: paginate;
border-spacing: 0;
}
If you're using divs, you can use page headers to repeat some content on each page.
<html>
<head>
<style>
@page { @top-center {content: element(header);} }
#header {position: running(header);}
</style>
</head>
<body>
<div id="header">Header</div>
</body>
</html>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | obourgain |
