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, 11 months ago
#35826
::
Hi Satish,
I found a way that hopefully meets the requirements of your use case: instead of specifying the HTML files in the PDF config object, you can directly insert them into the header/footer section of the PDF template. Then, you have access to the JSON data that is given as input for the PDF template.
With this approach, you do not use the ‘generateWithConfig’ function to generate a PDF, you can simply use ‘generate’.
For example, you can insert the content of the file ‘dynamic_header.html’ into the header section, and then access the material number etc. from the JSON data.