Forum


Replies: 5   Views: 5616
Page numbers: page x of y
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  · 29-12-2014 - 12:59

Hello,

phpdocx 6.5 added the page-of option to insert numberings "page X of Y".

As it's explained on: http://www.phpdocx.com/api-documentation/word-content/insert-page-number-Word-document-with-PHP You can add a numerical or alphabetical page number. But the current version of phpdocx doesn't allow to add manually 'Page X of Y'; future version will add support. You can change the base template to fit your needs or use a custom DOCX as the base template. For example adding the page number you'd like to use. This is the signature of the construct of CreateDocx class : /** * Construct * * @access public * @param string $baseTemplatePath. Optional, basicTemplate.docx as default * @param $docxTemplatePath. User custom template (preserves Word content) */ public function __construct($baseTemplatePath = PHPDOCX_BASE_TEMPLATE, $docxTemplatePath = '')

Regards.