Great thank you for pointing me to this, and it is working properly in my tests. I have couple more questions on this, first would it be possible to echo out just the total number of pages separate from the current page number. For example say I wanted to just show the total number of pages or maybe change up the text to say it in a different way for example "Current Page: <phpdocx_pagenumber data-target="defaultHeader" data-type="numerical" /> Total Pages: <TotalPages/> ".
Also related to that is there a way to apply css styling to this custom html tag from a parent HTML element. For example take the previous example if I wanted to change the font color of all of that text ideally I could wrap all of that within a div or something and apply the styling to the div and have that apply to everything contained within it:
<div style="color: red;">
Current Page: <phpdocx_pagenumber data-target="defaultHeader" data-type="numerical" /> Total Pages: <TotalPages/>
</div>
Would something like this be possible?