Php or javascript page counter

1

Well, I'm not able to use CSS @page to do page counting when printing, does anyone know a method?

<style>
  @page{
    counter-increment: page;
  }
  .totalpag{
    content: counter(page);
  }
</style>
<span class="totalpag"></span>

It's because it's a bit big and confusing, but basically it's a table with thead, tbody and tfoot. When I print, I get the right header for the lines and foot on each page, but I can not put the total pages on the last line as shown a print: Image

    
asked by anonymous 16.11.2017 / 17:41

0 answers