I am working with ejs to create pdf files. How can I get different header and footer for every page? When I use css, fixed-top:0 and fixed-bottom:0, all the headers and footers are printed in the first page.
you are using the wrong tool. you are using an html to pdf conversion, and html does not support variable page layouts. you probably want something more like: