I'm trying to create a page counter for a dynamic HTML pdf and my code is
.page-number:before {
counter-increment: pages;
content: " ";
}
.page-number:after {
counter-increment: page;
}
.page-number:after {
content: "Page " counter(page) " of " counter(pages);
}
<div>//some content</div>
<div class="page-number"></div>
but it will always print as "Page 1 of 1" for every page. Can someone point out the correct way of doing this?