Forum


Replies: 5   Views: 1645
Roman page number in footer
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 hotspot22  · 10-06-2020 - 12:16

Hi,

I've changed the page number type with addSection() to array('fmt'=>'upperRoman'). How do I get this numbering shown in the document footer?

There is already an example for this (changing header to footer and it works):

// create a Word fragment to insert in the default header
$numbering = new WordFragment($docx, 'defaultHeader');

// set some formatting options
$options = array(
        'textAlign' => 'right',
        'bold' => true,
        'sz' => 14,
        'color' => 'B70000',
);
$numbering->addPageNumber('numerical', $options);
$docx->addHeader(array('default' => $numbering));

But the problem is that addPageNumber() only accepts 'numerical', 'alphabetical' and 'page-of'. So there is no way that the page number is Roman.

Please give me an advice, thanks!