On this page:

To make changes to the footer or header of exported documents, you will need to modify the following files:

  • For the header - <template folder>/common/header.html
  • For the footer - <template folder>/common/footer.html

You can add a logo to the header or footer in one of the following ways:

  • Encode the logo image as the Base64 encoded string and use it as the value of the img src attribute.
  • Add a URL to the remote image as the value of the img src attribute.

    • The URL must be absolute, relative URLs do not work.
    • The URL must be accessible from the server where Web Application Platform is deployed.

Example of adding a logo to the header as a Base64 encoded string

Let’s say you want to use a logo in the header of the exported PDF file pages.


To add a logo to the header as a Base64 encoded string


  1. Encode the image as a Base64 string. You can use an online converter or use your own code/tools to make the conversion.
  2. Open the <template folder>/common/header.html file.
  3. Find the header tag.
  4. Add the img tag with <img src="{data:image/<image type>;base64,<Image as a Base64 encoded string> }" alt="<alt text>">
  5. Use other HTML tags and CSS styling information to display the logo image the way you want. Your code may look like the one below if you use a PNG image and want some padding around the image:

    Code example when using the PNG image type and some padding around the image

    <header class="header">
       <div style="padding: 10px;">
       <img src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAWCAYAAABjadrAAAAACXBIWXMAAAnyAAAJ8gEO/FPVAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAACJdJREFUWIXlmHuQU/UVxz/nd5MbWN5IxdqqKK9BirDqVAs+qq0KtAXcTSKoTLEqQ22Z+kBMcKchCEkWqrYqqEWlPhDNA5baVtHOaGu16gguRexAgVLxQZUVXEA3yd57+sfNJll01enUVuv5597feZ/v73XuFVXlw0jCS47AbW8AqUV0MMpAVPcgsgXkAczg5ZoOOR9q/H9Evi4l/fq0sKdlFUITqv1RORLkZCAEOg532+HAgv9apv8j6hIgvXNmEXjmUL6EUptQTYEc+6lm9hkh82/YnO493Ef/o5l8Rkm6OoM+VDmUCqH6MPAUuei3VPnkxp9T+sQrSEKLxqJ6L/Ayrn/qFwEc+IQASX1yEmqeANmIy1m6es5bn3ZinxXq+hYrkdQnL0VYivALeuZjuiLWJvWLvwrODISzgd5AG7AD9Hl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AJjs0xODMQn8VKb4fP0KVRKoBaRyupWxgB9vHMQQJ4lYLbjUoDiK2U9d9tQoAaXZkTOAM1j+RslmOjwMx8xV4Hbx2OYQeC2kwm5AD6pSw7DMB0Ay34cOBnvAJuhuei9pTAHpa5xKeKMRORo0L5AP0TyqO4C83vNRl6qnhHveyqwGARMu4JzpaZjBziUjP6ItuJeumGg+hp352vT9bvKepYJcaDmnxVDOcvrV0ttm+1vpf1AK8Xuh+vaWAXYUYWtbA3015XRvRJufAyXkZXPQuCd/Nt8KfBw1WmzhH4D/tHxt0KoX3Q7yKySsBX0VgLmRl0Z2fuBYr6A5AOZADwJrMIpZA7dm190+hdzuqIEhSKkvAAAAABJRU5ErkJggg==" width="72" height="22" alt="Logo"/>
       </div>
    </header>




The figure below shows an example of the exported document with the logo in the header.


An example of the exported document with the logo in the header.


Example of adding a logo to the footer using an absolute URL to the image

Let’s say you want to use a logo in the footer of the exported PDF file pages. In this example, we will use an absolute URL as the image source.


To add a logo to the footer using an absolute URL to the image


  1. Open the <template folder>/common/footer.html file.
  2. Find the footer tag.
  3. Add the img tag with <img src"http(s)://path_to_image" alt="<alt text>" >
  4. Use other HTML tags and CSS styling information to display the image the way you want. Your code may look like this (the CSS is inline for simplicity):

    Code example
    <footer class="footer"
          xmlns:th="http://www.w3.org/1999/xhtml">
       
    <div style="padding: 0 0 5px 5px; float: left; height: 25px;">
          <img src="https://www.3ds.com/assets/3ds-navigation/3DS_corporate-logo_blue.svg" 
               alt="Logo" style="width: auto;
               height:100%;
               object-fit: cover;">
       </div>   
       <div th:text="|${pagination.currentPageNumber}/${pagination.documentPagesSize}|" class="footer-text">
       </div>
    </footer>

The figure below shows an example of the exported document with the logo in the footer.


An example of the exported document with the logo in the footer.