Defining headers and footers
Important: This feature is only available for PDF export.
Adding headers and footers
You can define custom headers and footers for the pages you want to export. These texts will be displayed on all pages in the appropriate header/footer field.
If you open the export dialog and select the Formatting tab you can see a summary of headers and footers in the Headers/Footers section.
1. To define headers or footers, click Edit right to Headers/Footers fields:
2. In the pop-up dialog set the headers and footers:
Content in headers/footers are handled as HTML. This allows you to format the text using HTML formatting and styles and also to insert images. If you want to display XML/HTML in the header/footer, you have to manually escape it.
Note: The option of changing the size of the headers and footers is coming soon.
3. Use the checkbox to show or hide the footers on the cover pages.
Formatting dates
By default dates are shown in the format 'dd.MM.yyyy HH:mm', that produces the following output: 30.08.2022 09:54.
1. To change the default format, provide a custom date format after the field. The syntax for formatting is the following:
Fields
The following fields are date fields, so you can use the formatting on them:
[DOCUMENT_LAST_MODIFIED]
[DOCUMENT_CREATED]
[EXPORT_DATE]
Format string
Format string is built up from formatting symbols. The following table lists the formatting symbols and their meanings with examples.
Symbol | Date or time component | Example |
---|---|---|
y | Year | 2022, 22 |
M | Month in year | 08 |
d | Day in month | 30 |
E | Day in week | Wed |
H | Hour in 24h format | 09 |
m | Minute | 54 |
s | Second | 32 |
Some examples using the date for last modified: 2022-08-30 09:54:32
Format | Result |
---|---|
[DOCUMENT_LAST_MODIFIED 'yyyy.MM.dd. HH:mm'] | 2022.08.30. 09:54 |
[DOCUMENT_LAST_MODIFIED 'dd/MM/yy EEEE'] | 30/08/22 Wednesday |
[DOCUMENT_LAST_MODIFIED 'E d. MMM yyyy'] | Tue 30. Aug 2022 |
[DOCUMENT_LAST_MODIFIED 'HH:mm:ss'] | 09:54:32 |
[DOCUMENT_LAST_MODIFIED 'H:m:s'] | 9:54:32 |
You can find more details about formatting symbols in the Oracle documentation: Customizing Formats in java.
Inserting images into headers and footers
1. To insert an image, insert the HTML source in the header or the footer:
2. You may also insert the link of an image from a Confluence space, as long as the exporting user has read permissions for the page containing the image:
Important: Due to current technical limitations, width must be given to resize the image. The height attribute is ignored.
Showing the cover page title
By default Content Exporter does not export the title of the cover pages, however, it is possible to show it with the insertion of the following CSS code into the custom stylesheet:
For more information, see Custom Stylesheets.
Last updated