importHeadersAndFooters doesnt work after addTemplate. Here is code example from phpdocx (TemplateDOCX.php):
[code]require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addTemplate('../files/TemplateText.docx');
$docx->addTemplateVariable('WEIGHT1', '10');
$docx->addTemplateVariable('WEIGHT2', '20');
$docx->addTemplateVariable('WEIGHT3', '25');
$docx->addTemplateVariable('PRICE1', '5');
$docx->addTemplateVariable('PRICE2', '30');
$docx->addTemplateVariable('PRICE3', '7');
$docx->addTemplateVariable('TOTALWEIGHT', '55');
$docx->addTemplateVariable('TOTALPRICE', '42');
$docx->addTemplateVariable('NAME', '../files/Text.docx', 'docx');
$docx->importHeadersAndFooters('../files/TemplateHeaderAndFooter.docx','header'); // I added this line from importHeaderAndFooter.php
$docx->createDocx('../docx/template_docx_text');[/code]
The problem is that this code compleatly ingnores [code]$docx->importHeadersAndFooters('../files/TemplateHeaderAndFooter.docx','header');[/code] I get docx with default header. I tryed many variants and result is the same.
How can I get work importHeadersAndFooters in this case?