Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Suggested improvement: allow PDF template customizations that apply to single page exports

It would be vastly beneficial if editing the PDF export template was easy, and if it applied to single page exports, not just site exports.

1 comment

Hi Joel,

Did you had a look here and here. You'll see instructions on how to customize the PDF style-sheet used when doing a page "Export to PDF".

I had looked at the first link, and it says:


There are a few limitations to be aware of:

Changes to the PDF layout only apply to space exports, not to single page exports (via > Export to PDF).

Indeed. Their is two ways to configure PDF export:

  • PDF Layout : applies to space export only
  • PDF Stylesheet : applies to both space & page export

Here is a sample configuration you can copy / paste:

@page {
/* Make the page portrait A4 */
size: 210mm 297mm;

/* Add page / pages in bottom center */
@bottom-center {
font-size: 12pt;
color: #A9A9A9; /* DarkGrey */
content: counter(page) " / " counter(pages);

/* Nothing bottom right */
@bottom-right {

/* Nothing bottom left */
@bottom-left {

/* Change first page */
@page:first {
/* Reserve space above */
margin-top: 150px;

/* Reserve space below */
margin-bottom: 100px;

/* Company logo top left*/
@top-left {
background-image: url('');
background-position:left center;

@bottom-center {
font-size: 6pt;
font-style: italic;
color: rgb(69,0,204);
content: "This document is the property of COMPANY. It shall not be copied and / or disclosed to third parties, in any form without COMPANY written permission.";


body,p,li {
font-size: 12pt;
font-weight: normal;

/* Smaller font size for tables and TOC */
th, tr, td, toc-item-body {
font-size: 10pt;

/* Avoid page break after table header and inside table row */
th { page-break-after:avoid; }
tr { page-break-inside:avoid; }

/* Add numbering to section headers h1 to h4 */
/* Reset counter */
body {counter-reset: h1}
h1 {counter-reset: h2}
h2 {counter-reset: h3}
h3 {counter-reset: h4}
/* No counter on specific H1 i.e. Content table */
h1.ncount:before {content: normal}
/* Increment counter & update content */
h1:before {counter-increment: h1; content: counter(h1) ". "}
h2:before {counter-increment: h2; content: counter(h1) "." counter(h2) ". "}
h3:before {counter-increment: h3; content: counter(h1) "." counter(h2) "." counter(h3) ". "}
h4:before {counter-increment: h4; content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) ". "}

/* Page break before main sections, avoided after */
h1 {
font-size: 18pt;
page-break-before: always;
page-break-after: avoid;
color: rgb(0,54,160);

h2 {
font-size: 14pt;
page-break-after: avoid;
color: rgb(0,81,239);

h3 {
font-size: 12pt;
page-break-after: avoid;

h4 {
font-size: 12pt;
font-weight: normal;
page-break-after: avoid;

/* Fix display issue with Jira tickets */
span.jira-issue {
display: inline;

/* Fix default behavior on table's colum width */
table-layout: auto !important;
width: auto !important;
word-wrap: normal;

/* Fix background color of tables */
table.confluenceTable td.confluenceTd.highlight-grey { background-color: #D3D3D3;}
table.confluenceTable td.confluenceTd.highlight-red { background-color: #FF6347;}
table.confluenceTable td.confluenceTd.highlight-green { background-color: #90EE90;}
table.confluenceTable td.confluenceTd.highlight-blue { background-color: #87CEEB;}
table.confluenceTable td.confluenceTd.highlight-yellow { background-color: #FFD700;}

Like Jonathan Kelly likes this


Log in or Sign up to
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

292 views 4 14
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you