Forum


Replies: 3   Views: 363
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 admin  · 14-01-2024 - 08:40

Hello,

Please read the information available on https://www.phpdocx.com/documentation/snippets/translate-page-of-contents to change the text contents in page-of numbering. You need to set a new OOXMLResources::$pageNumber content.

Regarding the style, instead of CSS styles, in this case you need to set a custom paragraph style with the data-pStyle attribute (https://www.phpdocx.com/htmlapi-documentation/html-extended/insert-page-number-Word-document-with-HTML). This phpdocx_pagenumber tag calls the addPageNumber method (https://www.phpdocx.com/api-documentation/word-content/insert-page-number-Word-document-with-PHP), so the same options are available. In the case of the page-of type, a custom paragraph style must be applied to set custom styles.

Regards.