Pass parameters to the PDF's header/footer
Can I pass a parameter from the PDF template to the header/footer?
Thanks for any advice!
i don't think that it is possible, but phantomjs's header/footer always inherit all the data present in its template, so maybe you just need to have all the data needed for your header available in the template
Thanks, @bjrmatos .
I was thinking about fetching a value in the current page to the header.
For example, if the person in the current page is "Sebastian", the header displays "Sebastian". If the person in the next page is "Mia", the name "Mia" appears in the header. Each person might have multiple pages.
To be more specific, in https://playground.jsreport.net/studio/workspace/BkjGhA9V-/18 , is it possible to display each person's name in the header for all the pages belonging to that person?
i'm afraid that it is not possible, phantomjs header/footer are very limited and what you are trying to do is to pass the current handlebars context (the current
personitem in the array) to the header, but phantomjs does not a have a way that let's us know when new content will appear in a new page, and practically makes impossible for us to implement more advanced features in header/footer.
Thanks, @bjrmatos . I did check those ideas, but they do not work in my case since it is hard to find an accurate page size :-(