Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence "Export to PDF" CSS Table formatting

Stian Espe May 10, 2019

I am trying to get exported PDF showing all table data (headers+data) in normal font weight, not the default "header=bold" that Confluence are giving me. I have added the following in my CSS StyleSheet, and only the first table in the PDF is being formatted correctly. (All text = normal). Thanks for any comments!

.pagetitle h1 { 
background-image: url('/download/attachments/327881/dh-firstpage-background.png');
background-repeat: no-repeat;
background-size: 100%;
font-size: 36px !important;
margin-left: 0px !important;
padding-top: 400px !important;
page-break-after:always;
}

@page {
size: A4;
background-image: url('/download/attachments/327881/dh-page-background.png');
background-repeat: no-repeat;
background-size: 100%;
background-position: topleft;

@bottom-right {
content: "Side " counter(page) " av " counter(pages);
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 8pt;
}
}

h1{
color: rgb(76,118,144);
}
h2{
color: rgb(76,118,144);
}
h4{
color: rgb(31,77,120);
font-weight: normal;
}
table.confluenceTable th.confluenceTh {
font-weight: normal !important;
}

/*PAGE BREAKS*/
hr {
page-break-before: always;
}

1 answer

1 accepted

0 votes
Answer accepted
Stian Espe May 23, 2019

Found that imported tables from word/external applications in a page does not get the StyleSheet applied.

Copying data, into a new table created in Confluence resolved the problem.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events