Perhaps, lets the first start with static generation and then do the dynamic part.

Child templates are mostly producing HTML and have no impact on the pdf header or footer.
https://jsreport.net/learn/child-templates
However, you can add to the page some hidden marks through child templates and later produce headers/footer based on these values. This can be achieved using pdf utils extension
https://jsreport.net/learn/pdf-utils
This example mentioned in the docs could help
https://playground.jsreport.net/w/admin/Wy6stA8t