-
-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an example to generate pdf with header and footer for every page? #693
Comments
Hi @khasburrahman, you probably need to define the margins in the @page descriptor: @page {
/* width/height according to the format */
size: 210.0mm 297.0mm;
/* margins on every page */
margin-top: 10.0mm;
margin-right: 20.0mm;
margin-bottom: 20.0mm;
margin-left: 20.0mm;
} another solution if your footer contains only a single text line could be this: @page {
@bottom-center {
content: 'Here comes a simple footer text';
}
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
}
} The final solution would be however to have running CSS headers/footers, which is not supported (yet?) by WeasyPrint, see #598 But this would be actually a thing I'm also highly interested in;) |
Hi @ramonski I would like to have rich html header / footer, so |
With a negative |
Is there an example to generate pdf with header and footer for every page?
I tried using table head and table footer to create the header and footer
but it seems not yet supported as #36
then I came up with style
position:fixed
css attributeit works but the content is overlapping with the header / footer
margin-top
is only works on the first page.any idea / example for this problem ? Thanks
The text was updated successfully, but these errors were encountered: