Print Page number in custom print format

Hi everyone, Am trying to print page number in all pages with header. How to do it?

Thanks

Check this thread

checked but no luck… Any other idea?

@arokia
we have this in our print formats:

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

While using this i get “Page of” only printed with numbers.

@arokia actually I think I dont understand the requirement? what do you need? what do you get? can you describe more detailed?

@moe01325 Actually I need to get page number printed in all the pages in footer. This is my requirement.

It may help and lead to easier support you, if you invest a bit more time in providing explanations and descriptions of you problem.

In the PFD view, I get the following result when using the code provided earlier:
image

In the preview I dont get the actual numbers. I dont think that this is actually expected in the preview.

While click on print button it shows a preview. It is not showing the page number in preview or print.

End of the page am getting Page of