Hello,
We recommend you to use the fontSize option when you add the text or duplicate the value of sz. This is:
$style1 = array('outlineLvl' => 1,
'jc' => 'left',
'spacingBottom' => 100,
'font' => 'Times New Roman',
'bold' => true,
'sz' => 32,
'color' => ORANGE);
or
$docx->addText('First Heading1', array('pStyle' => 'style1', 'fontSize' => '16'));
About displayLeves, please use 1-3 to show them:
$tocOptions = array('autoUpdate' => false, 'displayLevels' => '1-3');
Some default Word styles may be showing and they need to be set in this way.
About this chunk of code:
$text = 'This is the first paragraph.';
$docx->addText($text, $pLeft);
the $pLeft variable isn't declared.
Regards.