Forum


Replies: 4   Views: 3278
Mergedocx loses headers and footers
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 coconnor  · 13-12-2016 - 19:24

Hello,

Using the Professional edition, and I'm not seeing mergeDocx work as described on the site. Here's what I'm doing: 

First, I create multiple Word documents based on existing templates. When I open these documents after they've been created, I clearly see the appropriate headers & footers. Good so far.

After the documents have been successfully created, I run mergeDocx in order to consolidate them into one document, with mergeType set to 0. Per the documentation, I expect the result to be a document which keeps the headers/footers of each document that's been merged. Instead, what I'm seeing at the end of this process is a document where ALL headers and footers have completely disappeared.

Is there something I can do during this merge process in order to keep each documents' headers and footers?

 

 

Posted by admin  · 14-12-2016 - 07:16

Hello,

Yes, setting the mergeType option as 0 in the mergeDocx method keeps the section (including headers and footers). You need to use the MultiMerge class to accomplish this task; this class is only available in Advanced (old Corporate) and Premium (old Enterprise) licenses, but not in the Basic license (old Pro).

As your username doesn't have a tied license, please send to contact[at]phpdocx.com the username or email of the user that purchased the license, the DOCX before merging them and the merged output.

Regards.

Posted by coconnor  · 14-12-2016 - 14:13

I have sent an email with the information you requested. Hoping that reveals what the issue may be.

Posted by admin  · 14-12-2016 - 15:29

Hello,

Which program are you using to open the DOCX? We have tested it using MS Word 2007, MS Word 2013 and LibreOffice 5 and all show the correct headers and footers (this is the same than the source documents) in the merged DOCX.

(The problem was an old version of LibreOffice)

Regards.

Posted by coconnor  · 14-12-2016 - 15:40

Yep- for the record, LibreOffice v4 had problems rendering the headers/footers. Looked fine on other versions of Word. Thanks gang!