hi @Happy-Patel
it looks your code is the right way, there are multiple ways you can simplify it, one way is that instead of adding pdf page item per property value, you just use a single call with all the properties. then in the header you are sure your data is in the 0 index, and can create just a single function for all your properties access.
if you need to conditionally render something based on the avatar you can still do it in the header, from the main you can just propagate the avatar value (without the if) no matter if it is undefined or not
here is a demo
https://playground.jsreport.net/w/anon/EoeNYCW3