Forum


Replies: 3   Views: 188
Is it possible to inject the number of pages and page number with embedhtml
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by jake@dewittsolutions.com  · 13-01-2024 - 17:52

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?