Moderator
Has successfully completed the online course Intermediate (200)
Has successfully completed the online course Advanced (300)
Has successfully completed the online course Basics (100)
Has successfully completed the online course Advanced (310)
Has successfully completed the online course Advanced (320)
Has successfully completed the Intermediate Certification
Has successfully completed the Advanced Certification 2 years, 9 months ago
#35416
::
If you want to add HTML to the header, you need to implement a workaround and also adapt the footer, unfortunately. Follow these steps to add an HTML header AND a page indicator in the footer:
- Create two HTML files: one for the header, one for the footer
- I have attached examples for both HTML files. The footer HTML file shows the page numbers. Adapt the header HTML file to your liking
- Upload both HTML files inside your application (in the section ‘Assets’)
- Adapt your PDF config object, so that you use the parameters ‘header-html’/’footer-html’ instead of ‘header-center’/’footer-center’. In these parameters, you need to specifiy the path to the location where the HTML files are stored on the appserver. For example, in my case, my app is called ‘test_JH’, so the paths are like that:
{ "header-html": "/opt/simplifier/data/storage/appDirect/test_JH/data/header.html", "footer-html": "/opt/simplifier/data/storage/appDirect/test_JH/data/footer.html" }Caution, the paths may vary depending on your instance setup. You can ask an administrator to get you the correct paths if you do not have access to the server.
- Deploy your app and test the PDF. You should now see the PDF file with the header/footer HTML
I know this process is quite cumbersome. I have created a ticket so that hopefully in the future, the PDF config and the header section can be used together.