I've tried many variations of document.write() but with no success. I just don't know if JS scripts in the header/footer can interact with the body element. Also using document.write() makes the pdf conversion to fail
Looking at the documentation in MDN, xhtml documents do not allow for document.write(), which makes things even more complicated
https://developer.mozilla.org/en-US/...Document/write