Hi,
Right now the built-in functions for page numbering in PDF-templates are limited. What we currently can do is apply meta tags to template how the page-numbering text is formatted and set its y-offset.
This leaves a lot to be desired. E.g. It is not possible to move the page numbering text on the x-axis if you want the text in the corner of a A4-document, nor is it possible to style the generated text to match the style of the document.
So my suggested solution to this would be to use pre-defined variable for the "current page"-value and "total pages"-value as seen in Winnovatives documentation on their HTML-to-PDF converter (https://www.winnovative-software.com/Help/html_to_pdf/html/c79846cf-4419-4a76-ae96-bcfa6afbd16a.htm).
Here is the example they provided in the documentation:
<!DOCTYPE html><html><head>
<title>Add Page Numbering in HTML</title></head><body style="font-family: 'Times New Roman'; font-size: 14px">
<table style="width: 100%">
<tr>
<td style="font-weight: bold; color: navy">HTML with Page Numbering</td>
<td rowspan="2"><a href="http://www.winnovative-software.com">
<img alt="Logo Image" style="width: 200px" src="img/logo.jpg" /></a></td>
<td rowspan="2" style="width: 5px"></td>
</tr>
<tr>
<!-- Add Page Numbering in HTML using &p; and &P -->
<td style="width: 90%">Page <span style="color: navy; font-weight: bold">&p;</span> of <span style="font-size: 16px; color: green; font-weight: bold">&P;</span> pages
</td>
</tr>
</table></body></html>
Here &p; is "current page"-value and &P is the "total pages"-value. Having the value available to give total control of the formatting and styling of the page-number text.