By default, the page headers of exported documents are empty. If you want specific information to be displayed in the page header, you need to add it to the <template_folder>/common/header.html file.

The page header can also display document information. You should check API for specific pieces of information that are accessible for usage in the page header.


Example of adding a document name to the page header

Let’s say you want a document name displayed in the center of the page header with some space around it.


To use a document name in the page header


  1. Open the <template_folder>/common/header.html file.
  2. Find the header tag.
  3. Add <div th:text="${documentInfo.name}"></div>.
  4. To make the document name centered, do one of the following:
    • Add an inline style.
    • Change the header class CSS properties in the <template_folder/common/styles.html file.
    • Add a new <style> tag in the header.html file and make the same changes you would in any other HTML document.

      Example of a header tag when using inline styling
      <header class="header">
         <div th:text="${documentInfo.name}" style="text-align: center; padding: 20px;"></div>
      </header>

After completing the steps above, the exported document will have its name displayed in the page header.


A sample document with the Image template document name displayed in the page header.