Hello,
Thanks for your DOCX samples. We have checked it and the problem is that the headers in your base document has external styles, so you just need to import them using the importStyles method:
if(file_exists($file_path.'/BaseHeaderTemplate.docx')){
try{
$docx->importHeadersAndFooters($file_path."/BaseHeaderTemplate.docx");
$docx->importStyles($file_path."/BaseHeaderTemplate.docx", 'replace');
}
catch(Exception $e){
print_r($e->getMessage());
}
}
The importHeadersAndFooters method doesn't import external styles.
Regards.