Confluence 5.7 has reached end of life
Check out the [latest version] of the documentation
This page is part of the guide on Developing Technical Documentation on Confluence Wiki.
Confluence is a platform for publishing online documentation. It also provides functionality for producing PDF versions of your documentation, allowing you to print the documentation, or to provide a copy to customers who are unable to access the online version. This guide describes how to export your technical documentation to PDF using Confluence's built-in PDF export. We also introduce a third-party add-on that provides additional PDF layout and style functionality.
Quick guide to PDF exports:
The rest of this page gives more details of the above procedures.
On this page:
If you plan to create PDF versions of your documentation, you may want to customise the PDF layout and styles for your space. These customisations will be applied every time you export documentation to PDF.
Under PDF layout you can add HTML to customise the PDF title page, and the page headers and footers. Under PDF stylesheet, you can adjust the appearance of the PDF pages.
If your space uses the Documentation theme:
Note: The Space Admin option appears only if you have space admin permissions, or if you're part of the 'confluence-administrators' group.
You can customise the HTML that is generated for the following areas when the space is exported to PDF:
Enter your customisations into each text box as required. The PDF layout section accepts HTML code. You can include inline CSS in the HTML too.
If your space uses the Documentation theme:
Note: The Space Admin option appears only if you have space admin permissions, or if you're part of the 'confluence-administrators' group.
The The 'PDF Export Stylesheet' page shows the current (e.g. customised) contents of your PDF stylesheet.
Below are typical customisations you may want to make for your technical documentation. For more examples, see Customising Exports to PDF.
The following example uses HTML with an inline CSS rule to generate a title page.
<div class="fsTitlePage" style="margin-left:auto;margin-top:75mm;margin-right:auto;page-break-after:always"> <img src="/download/attachments/12345/titlepage.png"/> </div>
The following example includes content above the automatically-generated table of contents that appears on the default title page, so that your title page includes your own content plus the table of contents.
<div class="fsTitlePage" style="margin-left:auto;margin-top:75mm;margin-right:auto;"> <img src="/download/attachments/12345/titlepage.png"/> </div>
In the examples above, the title page includes an image called 'titlepage.png', centred in the middle of the page. The image is attached to a Confluence page and is referenced via its relative URL (that is, we use only the last part of the URL, excluding the Confluence site's base URL).
Follow these instructions to include an image on your title page:
src="" attribute within your PDF stylesheet, as shown above./download/....You can add headers and footers to your PDF pages using HTML. Use the 'PDF Space Export Header' and 'PDF Space Export Footer' sections of the PDF layout to do this. For simple headers and footers, plain text is enough. The following example adds a simple copyright notice.
Copyright © 2010, Atlassian Pty Ltd.
PDF Layout HTML: In the Footer section (or the Header section), use an empty span element with a unique ID, for example pageNum, to act as a place holder for the page number.
<span id="pageNum"/>
PDF Stylesheet CSS: Create the following CSS selector rule for the empty span:
#pageNum:before
{
content: counter(page);
}
Analysing the above CSS selector rule in more detail:
#pageNum rule selects the HTML element with the specified ID of "pageNum", which is the span element we created for the header or footer.:before part of the selector is a pseudo class that allows the insertion of content before the span element is processed.counter(page) is a function that returns the current page number as its content.content property tells the CSS processor that dynamic content (that is, an incrementing page number) is to be inserted at the span tag.You can use the built-in Confluence PDF export to export a single page, a selection of pages or an entire space to a single PDF file.
You can export a Confluence page to PDF. This option exports a single page and is available to all users who have permission to view the page.
If your space uses the Documentation theme:
The Scroll PDF Exporter provides flexible themes for configuring PDF layout and styles. You can select one of Scroll PDF Exporter's built-in themes and configure your table of contents, header and title pages. For even more flexibility, see the section How Tos in the Scroll PDF Exporter documentation.
For this advanced PDF export functionality, you will need to install the Scroll PDF Exporter add-on into your Confluence site.
Now you know all about providing PDF versions of your documentation. What next? See other ways of Exporting and Printing Technical Documentation.