Add Page Item after Page Break
-
Hello, I have a multipage chrome-pdf report with header and footers and I used page break div. I add page name to the header with pdfAddPageItem function. While page break is dynamic it only send the page name for the first page, how is it possible to send page name to the header for other pages?
-
I'm not sure I get the problem. Please share a simple playground demo describing what you are trying to reach.
https://playground.jsreport.net/
-
Thanks for your attention,
Here is a sample I made to show the problem. I should use header merged with whole document to show the page number too.
https://playground.jsreport.net/w/artinweb/BSw1QQA3
-
You have it right, but chrome for some reason puts the second
pdfAddPageItem
to the previous page because you have no other content there. Just add something to the second-page content and it should work. Like here
https://playground.jsreport.net/w/anon/r7jyhhPB
-
Thanks, I don't get the error because my pages have lots of tags inside. And there's still a problem with multiple pages prepended to the main file. please have a look at this sample
https://playground.jsreport.net/w/artinweb/BSw1QQA3
-
Please check this part of the documentation
https://jsreport.net/learn/pdf-utils#operations-orderYou are merging the header twice.