Forum


Replies: 1   Views: 3269
Addheader() removes template's 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 Ahmad  · 04-06-2015 - 07:37

Hi, I use the function createDocxFromTemplate() to create a word document from a customized template. This template has a specific footer. The problem is when I try to add header (by using the function addHeader()). In this case, the footer in my customized template is disappeared in the exported word file. Does addHeader() removes template's header and footer ?

Posted by Ahmad  · 04-06-2015 - 08:10

I found the solution. The problem is when adding WordFragment with $target = defaultHeader. I replaced the target to "firstHeader" and it solved the problem.