Printing page number in the print format

I want to add page number in the footer in the format of “Page 1 of 3” or else “Page 2”, “Page 3”

Tried this, but not working.

<div class="print-format-footer">
    <p id="pagenum"><strong>{{ _("Page {0} of {1}").format('<span class="page"></span>', '<span class="topage"></span>') }}</strong>

Hi @nirmal2010,

Page numbers will only show in PDF, not in print or full-page print.


Thank You!


Thanks a lot @NCP for this code. Is there any possibility to print the page number?

Maybe not, but you can try.

Thank you