Forum


Replies: 3   Views: 1133
Footnotes number restart in each sections and problem with different headers when merging docx
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  · 28-05-2021 - 06:16

Hi,

No new version of phpdocx has been released, so that new feature hasn't been included yet in the current stable package.

The current testing branch includes the following new options in addSection and modifyPageLayouyt methods:

* endnotes (array) sets endnote options with the following keys and values:
     *     numFmt (string) numbering format: decimal, upperRoman, lowerRoman, upperLetter...
     *     numRestart (string) continuous, eachSect, eachPage
     *     numStart (int) starting value
     *     pos (string) sectEnd, docEnd
* footnotes (array) sets footnote options with the following keys and values:
     *     numFmt (string) numbering format: decimal, upperRoman, lowerRoman, upperLetter...
     *     numRestart (string) continuous, eachSect, eachPage
     *     numStart (int) starting value
     *     pos (string) pageBottom, beneathText

These new options aren't available in the current release of phpdocx, they will be included in the next release of phpdocx (there's no release date); they are fully tested and working correctly (not beta changes). As your license includes LUS you can get changes and new improvements from beta and testing branch. Please write an email to contact[at]phpdocx.com sending if you use the classic or namespace package and the dev team will send you a class updated adding support to those options and a sample script to illustrate how to use them.

A simple sample is the following when adding a new section:

$docx->addSection('nextPage', 'A4', array('footnotes' => array('numRestart' => 'eachSect', 'pos' => 'pageBottom', 'numFmt' => 'upperRoman')));

or setting it in an existing section:

$docx->modifyPageLayout('A4', array('footnotes' => array('numRestart' => 'eachSect', 'pos' => 'pageBottom', 'numFmt' => 'upperLetter')));

As explained previously, this is a section option so it needs to be set in the documents to be merged created from scratch or template). It's not a mergeDocx option.

Regards.