I am adding styles to a CreateDocx object. The styles are in an array that gets looped over:
$arr = array( 'mainhead' => array( 'font' => 'Trebuchet MS', 'color' => '000000', 'sz' => 24, 'b' => true ), 'parthead' => array( 'font' => 'Trebuchet MS', 'color' => '000000', 'sz' => 18, 'b' => true ) );
like so:
foreach($arr as $key=>$value) { $docx->createParagraphStyle($key, $value); }
But, it is resulting in an error for each iteration:
Notice (8): Undefined index: pStyle [APP/Lib/DocularToDocx/Lib/phpdocx-pro-5.0/classes/AutoLoader.inc(62) : eval()'d code, line 65]
The code is otherwise producing a Docx file correctly, except the styles are not being applied.
Using the option keys in the addText() styles (fontSize instead of sz) results in the same error.
Is anyone experiencing the same problem? Does anyone have a solution? I'm not able to find one.