PDF Output: Enable using javascript inside header and footer templates