How to repeat table header on new page

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 vote
Sean Curtis Atlassian Team Mar 05, 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.

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 Mar 05, 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 Mar 05, 2013
Sorry it looks like HTML chars are removed. It was thead and td

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.

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

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; }

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

910 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you