Replies: 1   Views: 2992
How to add pageof in document body?
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 admin  · 25-10-2016 - 18:13


Word has some limitations when adding content that must be autoupdated outside header and footer contents. And it may require pressing F9 to update it.
We recommend you to use headers or footers for this kind of content.

You also can use a template instead of the default empty document. You can create a DOCX that include the numbering, and use it as a template (using the CreateDocxFromTemplate class) adding new content and replace existing placeholders.

Or you can use the addSimpleField method to get the number of pages: