I am creating some PDF reports using iText in Java. According to the requirements, what I should do is to number pages in the format of page_number/page_numbers_in_t
you could handle page number with @page style sheet Like this @page { @top-right { content: "Page " counter(page) " of " counter(pages); } }
And when you need page number/Total page try with this: counter(page) "/" counter(pages)