0
@media print {
    body { margin: 0; }
    thead { counter-reset: pages; }
    .page-number:before { counter-increment: pages; content: " "; }
    .page-number:after { counter-increment: page; }
    .page-number:after { content: "Page " counter(page) " of " counter(pages); }
}

I am trying to display total of page number for every printed page.

For current it will only show total pages for the first page.

E.g. got total page 3, it shows

Page 1 of 3 , Page 2 of , Page 3 of 

I am trying most of the sample, but no luck. Is there anyway to achieve this?

https://codepen.io/anon/pen/OQNreQ

Crazy
  • 847
  • 1
  • 18
  • 41
  • I see your question is in https://stackoverflow.com/questions/34654071/print-page-count-with-total-number-of-pages-using-css. Let try with this. – Khoi Ngo Nguyen Feb 05 '18 at 03:43
  • @KhoiNgoNguyen This is not working, that's why i am doing it in another way. – Crazy Feb 05 '18 at 03:47
  • So that other question I closed was a repost of this? – BoltClock Feb 05 '18 at 10:25
  • @BoltClock I edited that other question in an attempt to get it reopened, because I wanted to post an answer. Should I just post here? – Danield Feb 05 '18 at 10:30
  • @Danield: Given that more time and energy has been invested by multiple people in the other question I think we'll keep that one instead. – BoltClock Feb 05 '18 at 10:32

0 Answers0