You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a header to a pdf with margins. These margins are calculated specifically for the content loaded in the pdf and should not be exceeded, as this cuts off part of the pdf content. However, to show the header inside the pdf, i followed the instructions on #9 which stated that the margins should be big enough to show the header content.
Is there a way to add header/footer to pdf without it using the margins set in the options? Or maybe overwriting the margins for the header?
additional issue/question: is it possible to add numbering to specific pages of the pdf, and resetting this to 1 on page x? The content loaded on my pdf are x amount of lists, so if possible, I would like to add numbering like this: list 1 has 10 pages and should show in header 'page 1 out of 10', then a new list begins on page 11, so list 2 should show 'page 1 out of 10' again
The text was updated successfully, but these errors were encountered:
You can try to set inline paddings or margins inside the header and/or body HTML instead of using the margins option. Regarding the page numbers - they get injected automatically in the footer or header if you use certain HTML classes. You can find them here: https://pptr.dev/api/puppeteer.pdfoptions.headertemplate
I don't think you'll be able to reset them.
I'm trying to add a header to a pdf with margins. These margins are calculated specifically for the content loaded in the pdf and should not be exceeded, as this cuts off part of the pdf content. However, to show the header inside the pdf, i followed the instructions on #9 which stated that the margins should be big enough to show the header content.
Is there a way to add header/footer to pdf without it using the margins set in the options? Or maybe overwriting the margins for the header?
The text was updated successfully, but these errors were encountered: