Replies: 10   Views: 4463
Dynamic fields with default docx 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  · 16-02-2016 - 15:10


After you have the DOCX merged you just need to use the importHeadersAndFooters method to add the headers to all pages of the document.

The steps are:

1. Generate a new document replacing the content of the template.

2. Merge the DOCX if needed. To do this you need the document of the previous step and the other document to merge with.

3. Import the headers to the document merged in the previous step to add the headers to all pages.

If you want to attach the second page to the end, you'll need to have this second page as a standalone DOCX to be merged. You can't split an existing document.