-
AdityaHas successfully completed the online course IntroductionHas successfully completed the online course Basics (100)1 year ago #35404
Hi,
We have to show the page number in the footer of every page in the format “Page x of y”. I tried to implement this using the config JSON, but somehow using the same is not visible on the PDF because we have used the header section of the plugin. And now I was trying to implement the footer section of the plugin, but was not able to get the value of page number. Please let me know how we can achieve this using the footer section.
Thanks in advance !!
Jennifer HäfnerHas 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 CertificationHas successfully completed the Advanced Certification1 year 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.
Attachments:
You must be logged in to view attached files.Vitali KurdasovHas successfully completed the online course Intermediate (200)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the Intermediate CertificationJennifer HäfnerHas 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 CertificationHas successfully completed the Advanced Certification1 year ago #35408AdityaHas successfully completed the online course IntroductionHas successfully completed the online course Basics (100)AdityaHas successfully completed the online course IntroductionHas successfully completed the online course Basics (100)Jennifer HäfnerHas 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 CertificationHas successfully completed the Advanced Certification1 year ago #35819::Hi Satish,
You cannot directly pass JSON data to the files in the assets section. What you can do is to upload separate files to the assets section, one file for each language. Then, in the process designer, check which language is currently used (e.g., with the CSBO function ‘ITIZ_Utilities’ – ‘getLanguage’) and load the respective file from the assets according to the current language.
Jennifer HäfnerHas 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 CertificationHas successfully completed the Advanced Certification1 year ago #35827::Hi Aditya,
After some testing, I found that you can also insert the content of the HTML header/footer files into the header/footer section of the PDF template. This means you do not need the PDF config object anymore. Also, in the header/footer section, you have access to the JSON data that is given as input for the PDF template, so I think this approach is more flexible.
You must be logged in to reply to this topic.