It is possible for EdgeChromium browser. I am using ul and li only for this.
I have done:
<ul>
<div class="footer_wrapper page_001">
<footer><li class="page"></li></foooter>
</div>
<div class="footer_wrapper page_002">
<footer><li class="page"></li></foooter>
</div>
<div class="footer_wrapper page_003">
<footer><li class="page"></li></foooter>
</div>
<footerfix>
<la class="page"></la>
<footerfix>
</ul>
with css
@page {
size: A4;
margin: 0;
padding: 0;
}
footerfix
{
width: 210mm;
height: 40mm;
bottom: 0;
z-index: 100;
}
html, body {
width: 210mm;
height: 297mm;
margin: 0;
padding: 0;
}
.footer_wrapper {
position: fixed;
width: 210mm;
height: 297mm;
margin: 0;
padding: 0;
left: 0mm;
background-color: transparent;
}
footer {
width: 210mm;
height: 297mm;
margin: 0;
padding: 0;
position: relative;
white-space: nowrap;
text-align: center;
z-index: 3000;
page-break-after: always;
background-color: transparent;
.page_001 {
top: 0mm;
z-index: 3001;
}
.page_002 {
top: 297mm;
z-index: 3002;
}
.page_003 {
top: calc(2*297mm);
z-index: 3003;
}
ul {
list-style-type: none;
padding: 0;
margin: 0;
counter-reset: seite seiten;
}
li::before {
counter-increment: seite seiten;
content: "page "counter(seite) " / ";
}
la::after {
content: counter(seiten);
}
.page {
background-color: white; /*otherwise page numbers on top of each other*/
}