How to repeat table header on new page

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2013

Hello,

did anyone manage to create PDFs with long tables that extend over several pages and have a table header on every new page?

I tried

thead {display: table-header-group;}

And on this page someone mentioned that for Flying Saucer this had to be added:

table {
-fs-table-paginate: paginate;
}

I tried PDF exports with both but nothing happened. When I create a PDF with the print function of the browser it works though.

2 answers

0 votes
Erik Söderström April 23, 2014

Did anyone find an answer to this? I'm stuck trying to get repeating headers for our tables in our PDF Exports from Confluence 5.4.

Cheryl Schmelzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2015

Has anyone been successful at getting table headers to repeat? Thank you.

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 21, 2015

I am also still interested (but also pretty certain that it doesn't work). Just tried again with .wiki-content .table-wrap .confluenceTable thead { display: table-header-group; } .wiki-content .table-wrap table { -fs-table-paginate: paginate; }

0 votes
Sean Curtis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2013
I'm guessing this is for Confluence? If so does the markup use a and elements? I remember seeing elements styled as heading rows. If they are cells then check if their surrounding has a class relating to it being a heading row as opposed to a content row. If it does then try adding display: table-header-group; to it.
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2013

Well, the heading of the table is surrounded by a <thead> element and the header cells are <th>. But when I add the "display: table-header-group" to any of these element it has no effect.

I suppose it is not working with flying saucer. But proof of the opposite would be more than welcome.

@Sean: The following sentence I do not understand. Is there a word missing perhaps?

If so does the markup use a and elements?

Sean Curtis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2013
I will have a play when I'm at work tomorrow. Not sure if keeping the thead at the top is default browser behavior or not. Printing to PDF is probably different too.
Sean Curtis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2013
Sorry it looks like HTML chars are removed. It was thead and td

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events