Forum


Replies: 1   Views: 3319
Replacevariablebywordfragment 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 cinngigi  · 02-05-2015 - 12:37

replaceVariableByWordFragment footer not replacing. $wf = new WordFragment($docx,'footers'); $wf->addText($erow['EntityName']); $docx->replaceVariableByWordFragment(array('EntityName' => $wf), array('type' => 'inline','target'=>'footers')); $docx->replaceTableVariable($data); $docx->createDocx('report'');

Posted by admin  · 04-05-2015 - 08:40

Hello, The feature to replace placeholders by WordFragments in headers and footers is available since phpdocx 4.6, please check you're using this version. To replace the placeholders in the footers you need to use 'footer'. For example: $docx->replaceVariableByWordFragment(array('EntityName' => $wf), array('type' => 'inline','target'=>'footer')); Regards.