Category: Atlassian Confluence

Confluence – Export PDF Template

I spent the good part of a sunday afternoon to play around with the Export to PDF function in Confluence, and this is my finished stylesheet. Inspired by various online sources…

body {
font-family: Arial, sans-serif;
font-size: 12pt !important;
letter-spacing: normal;
}

*|h1 {
font-family: Arial, sans-serif;
font-size: 44pt !important;
letter-spacing: normal;
}

*|h2 {
font-family: Arial, sans-serif;
font-size: 34pt !important;
letter-spacing: normal;
}

*|h3 {
font-family: Arial, sans-serif;
font-size: 24pt !important;
letter-spacing: normal;
}

*|h4 {
font-family: Arial, sans-serif;
font-size: 16pt !important;
letter-spacing: normal;
}

.pagetitle h1 {
font-family: Arial, sans-serif;
font-size: 50pt !important;
margin-left: 0px !important;
padding-top: 150px !important;
page-break-after: always;
}

@page {
size: 210mm 297mm;
margin: 15mm;
margin-top: 20mm;
margin-bottom: 15mm;
padding-top: 15mm;
font-family: Arial, sans-serif;

.pagetitle {
page-break-before: always;
}

@top-right {
background-image: url("wiki/download/attachments/127662/Logotype-Company-Digital-black.png");
background-repeat: no-repeat;
background-size: 80%;
background-position: bottom right;
}

/* Copyright */
@bottom-left {
content: "Company AB";
font-family: Arial, sans-serif;
font-size: 8pt;
vertical-align: middle;
text-align: left;
letter-spacing: normal;
}

/* Page Numbering */
@bottom-center {
content: "Page " counter(page) " of " counter(pages);
font-family: Arial, sans-serif;
font-size: 8pt;
vertical-align: middle;
text-align: center;
letter-spacing: normal;
}
	
/* Information Class */
@bottom-right {
content: "Information Class: Restricted";
font-family: Arial, sans-serif;
font-size: 8pt;
vertical-align: middle;
text-align: right;
letter-spacing: normal;
}

/* Generate border between footer and page content */
border-bottom: 1px solid black;

/* end of @page section */
}

/* Insert page-break at each divider in the page */
hr {  
page-break-after:always;  
visibility: hidden;  
}

/* Fix tables breaking outside the print-area */
table.fixedTableLayout {
    table-layout: fixed !important;
    width: 80% !important;
}

div.wiki-content {
width: 150mm !important;
margin: 0px 10mm 0px 10mm !important;
}

body,div,p,li,td,table,tr,.bodytext,.stepfield  {
font-size: 11pt !important;
letter-spacing: normal;
word-wrap: break-word;
}