Replies: 1   Views: 1099
Blocks in header/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 dan_brokerbusiness  · 26-01-2021 - 06:01

It seems deleteTemplateBlock() and clearBlocks() only work in the document body, not in the header or footer.

Is there any other way to achieve the same functionality for header/footer?

Posted by admin  · 26-01-2021 - 06:24


Using DOCXPath you can clone (cloneWordContent) and remove contents (removeWordContent) in the document body, headers and footers. In the example folder available in the package you can find samples about using them with headers and footers.