Replies: 5   Views: 3342
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 thetaylor82  · 02-08-2016 - 15:43

Is it possible to use the importHeadersAndFooters method but just for the first page. I know the header method allows this but I need an image across the comple top of the page and am unable to get the header method to do this.

Posted by admin  · 02-08-2016 - 18:13


There's no method to import only the header for the first header.

One approach would be generating the first page of the DOCX standalone (this is a document) importing the header to this documebt, generate the other content in other DOCX and then merge both using the method mergeDocx.

Or you could use a template created with Word that include the header only in the first page.


Posted by thetaylor82  · 03-08-2016 - 08:43

Thanks for the reply, I have changed the template so the header is set to first page only but the resulting docx and pdf do not show the header image at all.

Any ideas?

Posted by admin  · 03-08-2016 - 18:46


We have done some quick tests and everything is working fine. We have created a DOCX template with a header in the first page, and after adding content the header remains in the DOCX and in the PDF if we transform the document using the conversion plugin.

Please check you're not removing the header by mistake or using a wrong template.


Posted by thetaylor82  · 04-08-2016 - 07:49

I have the template docx file with an image full width in the header section and have made sure the different first page box is ticked. I have just checked the exported docx which shows no header along with the pdf.

But if i go to the header settings in the created document and tick the different first page box the image then appears on the first page. It seems that it doesnt keep the settings checked when it creates the word document. Any suggesations why this may be?

Posted by admin  · 04-08-2016 - 19:01


Please send the DOCX to contact[at] and we'll check it. Also please send the most simple script that illustrates your issue; as we need to run the script please dont' do external connections such as databases or web services.