Forum


Replies: 4   Views: 3218
How can i addimage after header/footer for each page?
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  · 08-12-2017 - 08:24

Hello,

background images, watermarks and headers/footers can be used to repeat a content in all pages.

If you are creating the DOCX from scratch, you can add the image as a WordFragment when inserting the header or footer. Please check the examples available for the addHeader (http://www.phpdocx.com/api-documentation/layout-and-general/insert-headers-Word-document-with-PHP) method.

If you are using a template, please add a placeholder in the header or footer with the program you are using to generate the templates and then replace the placeholder by an image using the replaceVariableByWordfragment (http://www.phpdocx.com/api-documentation/templates/replace-variable-word-fragment-Word-document) method setting the right target option.

DOCXPath can only be used with the body content. 

Regards,

phpdocx support Team