On this page
To make changes to the footer or header of exported documents, you will need to modify the following files:
You can add a logo to the header or footer in one of the following ways:
Add a URL to the remote image as the value of the img src attribute.
|
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
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:
| Code example when using the PNG image type and some padding around the image |
|---|
<div th:fragment="HeaderFragment" xmlns:th=http://www.thymeleaf.org> <style> @page { @top-left { content: element(header) }} </style> |
The figure below shows an example of the exported document with the logo in the header.

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
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):
<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.
