-
Notifications
You must be signed in to change notification settings - Fork 344
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
Can we generate the page number dynamically? #39
Comments
Yes this should be possible. It depends on you. How do you use the sections? E.g. you can initialize a Javascript variable which is incrementing with each new section or you generate the html from an external programming language and use there a loop to increment a counter which is displayed in the html. |
I use the following approach: body {
counter-reset: article;
}
article::after {
counter-increment: article;
content: attr(data-pageLabel) counter(article) " ";
text-align:right;
display: inline-block;
position: absolute;
bottom: 15mm;
right: 15mm;
font-size: 8pt;
}
`
data-pageLabel is an attribute I use in the article tag in order to have a translatable string in HTML rather than having it inside the CSS. |
I am looking to generate page number dynamically while printing the document. Is there any possible way to do that?
The text was updated successfully, but these errors were encountered: