Child pages
  • Providing PDF Versions of your Technical Documentation
Skip to end of metadata
Go to start of metadata

This page is part of the guide to developing technical documentation on Confluence Wiki. Confluence itself is an excellent platform for publishing online documentation. In some cases, though, you may need to produce PDF versions of your documentation for printing, or to supply to customers who cannot access the online version.

Confluence itself provides an export to PDF. Plugins provide additional functionality.

Quick guide to PDF exports

  • Customise the PDF layout (title page, header and footer) and stylesheet, for use each time you export your documentation.
  • Export a single page to PDF.
  • Export an entire space or a selection of pages to PDF.
  • Consider installing a third-party plugin for advanced functionality.

The rest of this page gives more details of the above procedures.

Customising the PDF Layout and Stylesheet

If you are planning to provide PDF versions of your documentation, you may want to customise the PDF layout and styles for your space. These customisations will apply each time you export your documentation to PDF.

In the PDF layout, you can add your own HTML to customise the title page, page headers and page footers in the PDF output. In the PDF stylesheet, you can adjust the appearance of the PDF pages.

Editing the PDF Layout

  1. Go to the 'Space Admin' tab of the Browse Space view. To do this:

    • Go to a page in the space, open the 'Browse' menu and select 'Space Admin'.
      (info) 'Space Admin' is displayed only if you are a space administrator for that space or you are a Confluence system administrator.
  2. Click 'PDF Layout' in the 'Look and Feel' section of the left-hand panel.
  3. Click the 'Edit' button. You can now customise the HTML that generates following areas in the exported PDF document:
    • PDF Space Export Title Page – title page.
    • PDF Space Export Header – page headers.
    • PDF Space Export Footer – page footers.
  4. 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.
  5. Click 'Save'.

Editing the PDF Stylesheet

  1. Go to the 'Space Admin' tab of the Browse Space view. To do this:

    • Go to a page in the space, open the 'Browse' menu and select 'Space Admin'.
      (info) 'Space Admin' is displayed only if you are a space administrator for that space or you are a Confluence system administrator.
  2. Click 'PDF Layout' in the 'Look and Feel' section of the left-hand panel.
  3. Click the 'Edit' button. You can now customise the HTML that generates following areas in the exported PDF document:
    • PDF Space Export Title Page – title page.
    • PDF Space Export Header – page headers.
    • PDF Space Export Footer – page footers.
  4. 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.
  5. Click 'Save'.

Some Useful Examples

Below are the typical customisations you may want to make for your technical documentation. For more examples, see Editing the PDF Stylesheet.

Adding a Title Page

You can create a title or cover page to your PDF document using HTML. Use the 'PDF Space Export Title Page' section of the PDF layout to do this.
Adding a New Title Page

The following example uses HTML with an inline CSS rule to generate a title page.

Including Content Above Table of Contents in Default Title Page

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.

Adding an Image to your Title Page

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:

  1. Attach the image to a Confluence page.
  2. View the list of attachments on that page.
  3. Right-click the image and copy its location.
  4. Paste the link into the appropriate src="" attribute within your PDF stylesheet, as shown above.
  5. Remove the first part of the URL before /download/....

Adding Headers and Footers

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.

Adding Page Numbering to a Header or Footer

To add page numbering to your documentation, you need to combine some customised HTML in the header or footer with some customised CSS in the PDF stylesheet.
  1. Create a header or footer with an empty span element and give it a unique ID, for example pageNum. This is a place holder for the page number in your PDF document.
  2. Create the following CSS selector rule for the empty span and add it to the PDF stylesheet:

Analysing the above CSS selector rule in more detail:

  • The #pageNum rule selects the HTML element with the specified ID of "pageNum", which is the span element we created for the header or footer.
  • The :before part of the selector is a pseudo class that allows the insertion of content before the span element is processed.
  • The counter(page) is a function that returns the current page number as its content.
  • The content property tells the CSS processor that dynamic content (that is, an incrementing page number) is to be inserted before the span tag.

Exporting a Single Page to PDF

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:

  • Go to a page in the space, open the 'Tools' menu and select 'Export to PDF'. Follow the prompts to export the page.

Exporting a Space or a Selection of Pages to PDF

Using the built-in Confluence PDF export, you can export a single page, a selection of pages or an entire space into a single PDF file.

  1. Go to a page in the space, open the 'Browse' menu and select 'Advanced'.

  2. Click 'PDF Export' in the left-hand panel.
    This option will only be visible if you have the 'Export Space' permission.
  3. Select the pages you want to export by ticking the check boxes next to each page.
    • You have the option to 'Select All' or 'Deselect All' pages.
    • When you select a page, all its child pages will also be selected. Similarly, when you deselect a page all its child pages will also be deselected.
  4. Click 'Export'.
  5. When the export process has finished, download and save the PDF file as prompted.



Exporting a Spaces or Pages to PDF via a Plugin

For advanced PDF export, consider installing the Scroll Wiki Exporter plugin onto your Confluence site. Scroll provides flexible themes for configuring PDF layout and styles. You can select one of Scroll's built-in themes and configure your table of contents, header and title pages.

Advanced techniques for Scroll Wiki Exporter. For even more flexibility, you can add your own theme plugins. Scroll supports themes based on DocBook XSL stylesheets. See the Scroll developer's guide.

Notes

  • Permissions required to export a space. To use the space export functionality, you need 'Export Space' permission. See the guide to space permissions or contact a space administrator for more information.
  • Installing plugins. If you decide to use additional plugins, your site administrator will need to install the plugins into your Confluence site. Refer to the documentation on installing plugins.
  • Plugin support. Before installing a plugin into your Confluence site, please check the plugin's information page to see whether it is supported by Atlassian, by another vendor, or not at all. See our guidelines on plugin support.
Next Steps

Now you know all about providing PDF versions of your documentation. What next? See other ways of Exporting and Printing Technical Documentation.