Forum


Replies: 3   Views: 2154
Parsestyles returns a php notice
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 pwctechnicalsecurity  · 30-07-2019 - 19:32

$docx = new CreateDocx();

$docx->parseStyles();

$docx->createDocx('output');

parseStyles is providing me with a "Notice: Undefined index: textProperties" error. Any suggestions? I have tried multiple things; like including using $docx = new CreateDocxFromTemplate('test.docx'). In all scenario's parseStyles throws the error:

(1/1) ErrorException

Notice: Undefined index: textProperties

in CreateTable.php line 598

at CreateTable->generateP('Title A', array('tableStyle' => 'TableNormal', 'columnWidths' => array(1800, 1800, 1800), 'size_col' =>array(1800, 1800, 1800), 'TBLSTYLEval' => 'TableNormal'))in CreateTable.php line 336

at CreateTable->createTable(array(array('Title A', 'Title B', 'Title C'), array('First row A', 'First row B', 'First row C'), array('Second row A', 'Second row B', 'Second row C')), array('tableStyle' => 'TableNormal', 'columnWidths' => array(1800, 1800, 1800), 'size_col' => array(1800, 1800, 1800), 'TBLSTYLEval' => 'TableNormal'), array())in CreateDocx.php line 3853

at CreateDocx->addTable(array(array('Title A', 'Title B', 'Title C'), array('First row A', 'First row B', 'First row C'), array('Second row A', 'Second row B', 'Second row C')), array('tableStyle' => 'TableNormal', 'columnWidths' => array(1800, 1800, 1800), 'size_col' => array(1800, 1800, 1800), 'TBLSTYLEval' => 'TableNormal'))in CreateDocx.php line 6836

at CreateDocx->parseStyles()in TestController.php line 41

Any clues? Thanks.