Hello,
The importContents method imports contents from an external DOCX. If no referenceNode is set, all contents are imported. This method is useful when importing specific contents (or exclude specific contents if needed using a custom XPath query).
If you neeed to import all contents, we recommend you use mergeDocx (https://www.phpdocx.com/api-documentation/docxutilities/merge-Word-documents-with-PHP). Setting the mergeType option you can preserve or ignore the sections (that also include the headers and footer):
0: preserves the sections of the merged document with their respective headers and footers.
1: merges the contents at the end of the last section of the first document.
If you set mergeType as 1, sections from the merged DOCX are ignored, and contents are added at the end of the last section of the first document. Maybe this method is the best approach for your needs.
If you send the DOCX samples to contact[at]phpdocx.com we'll check them to recommend the best approack for your task.
Regards.