Forum


Replies: 6   Views: 4377
Error generating header and footer
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 blankdemon  · 28-08-2014 - 21:43

Hello! I have error using corporate 3.6. Error say: Location: Part: /word/defaultFooter.xml, Line 11, Column 247. Can you help me? The method that generate footer looks like next lines: public function createFooter($texto, $rutaLogoFooter) { $logo = $this->driver->addImage(array('name' => $rutaLogoFooter, 'rawWordML' => true, 'target' => 'defaultFooter', 'textWrap' => 1, 'float' => 'right')); $texto = $this->driver->addText($texto, array('jc' => 'left', 'b' => 'off', 'sz' => 10, 'rawWordML' => true)); $numeroPagina = $this->driver->addPageNumber('numerical', array('jc' => 'center', 'rawWordML' => true)); $logoFooter = $this->driver->createWordMLFragment(array($logo)); $textoFooter = $this->driver->createWordMLFragment(array($texto)); $numPaginaFooter = $this->driver->createWordMLFragment(array($numeroPagina)); $valuesTable = array( array( $textoFooter, $numPaginaFooter, $logoFooter ) ); $options = array('tableWidth' => array('pct', 100), 'size_col' => array(7000,6000,7000), 'border' => 0, 'jc' => 'center', 'rawWordML' => true); $footerTable = $this->driver->addTable($valuesTable, $options); $myFooter = $this->driver->createWordMLFragment(array($footerTable)); $this->driver->addFooter(array('default' => $myFooter)); } Regards