Add a page in the footer of your Word document with PHPdocx

  • Jun 06, 2011

This information is outdated, please, refer to the addPageNumber documentation for up to date info.
Do you need to include page numbers in the Word document footer?
Learn how to do it with this sample code:


$docx = new CreateDocx();

$docx->addText('Page 1 Content');

$docx->addText('Page 2 Content');

$docx->addText('Page 3 Content');

$paramsFooter = array(
'font' => 'Arial',
'pager' => 'true',
'pagerAlignment' => 'right'

$docx->addFooter('Footer. Arial font', $paramsFooter);