Forum


Replies: 9   Views: 1059
Replacing variable inserts a footer on page 1 when not present in template
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 - 05:34

Dear Rick,

Headers and footers have some common tags, so changing one may affect others. As explained in our previous email, addHeader and addFooter methods aren't methods to be used with templates but with documents created from scratch.

Your template includes footers in the first DOCX, but they are hidden because the template uses <w:titlePg/> tag (tag shared by headers and footers) that hides the footer. The addHeader method removes it because this method is for documents created from scratch, not templates.

Please follow the approaches detailed in our previous email, there's no other way to change headers or footers in templates in the current release of phpdocx. The importHeadersAndFooters approachs work perfectly for your case.

Closed to avoid duplicated messages. The same is being sent by email.

Regards