$docx = new CreateDocx();
$paramsHeader = array(
'name' => '../../header.png',
'textWrap' => 5,
'font' => 'Times New Roman'
);
$docx->addHeader('', $paramsHeader);
The same doesn't work after upgrading to 2.5 release.
Got the below error, when file is opened.
The file report.docx cannot be opened because there are problems with the contents.
Details:
No error detail available.
Location: Part: /word/header.xml, Line: 1, Column: 1509
I see the below changes in 2.5, in /phpdocx/classes/CreateDocx.inc
//TODO: This is a temporary solution not to break the old addHeader method
if (!empty($this->_wordHeaderC) && $this->headerAdded) {
self::$log->debug('There is a new header, add it.');
$headerId = $this->generateTemplateWordHeader();
self::$log->info('Add word/header.xml content to DOCX file.');
$headerHandler = fopen($this->_baseTemplateFilesPath.'/word/header.xml', "w+");
addHeader might have been broken.
Please suggest a solution for this.
I really appreciate if I can know whether there is a solution or not.
Thanks.