Replies: 4   Views: 3176
Stop header an 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 Chafik  · 05-06-2011 - 10:46


I want to write a header and footer only in the first page of my document, and then i want to stop it in the other pages.
How can i do this?


Posted by Engels  · 11-04-2013 - 12:12

I want to do this, too...

Is there any solution for this meanwhile ?

Posted by ardigital  · 11-04-2013 - 12:12

Likewise, I really could do with this as well.

My initial thoughts were to draw them in just for the 1st page but this is no good as you need to know if the size of content you are putting on the first page, in order to know where to put the footer.

Any feedback?

Posted by ardigital  · 11-04-2013 - 12:12

Fixed, create your word template header and footer but set it so that "First page is different", that way header and footer is only for the first page.

When you create your Docx in PHPdocx, just importHeaderAndFooter as you normally would.


$docx = new CreateDocx($template_path);