Forum


Replies: 7   Views: 472
Add pagination and contents to the footers replacing them in an existing 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  · 12-01-2022 - 17:22

Hello,

importHeadersAndFooters remove existing headers/footers to add the imported ones. There's no method to add new headers and footers keeping existing ones in a DOCX document. A custom development should be done for this specific task.

Using template methods you can replace placeholders in headers and footers (and also other targets: document, footnotes, comments...). Using DOCXPath you can add, remove and replace contents in the main document, headers and footers; but headers and footers must exist to be able to change them.

Regards.