Hello,
'Heading 1' is not an allowed type (https://www.phpdocx.com/api-documentation/docxcustomizer/customize-docx-Word-documents-PHP):
type string * (all), break, image, list, paragraph, run, section, style, table, table-row, table-cell.
Please check the included sample examples/DocxCustomizer/sample_9.php that changes styles from the style target. For example:
$referenceNode = array(
'target' => 'style',
'type' => 'style',
'attributes' => array('w:styleId' => 'myStyle'),
);
$docx->customizeWordContent($referenceNode,
array(
'bold' => false,
'italic' => false,
'backgroundColor' => 'FF0000',
'caps' => false,
'lineSpacing' => 240,
)
);
Please note the previous sample uses the attribute w:styleId that may not be the same that the style name. Heading1 should be the styleId for Heading 1 . Using parseStyles you can get the styles from an existing DOCX.
Regards.