I tried to import my own template style thanks to importStyles with merge parameter and array of my customs styles.
I apply those styles to my document. But when I opened it (the generated document), styles witch I imported are not applied correctly or not applied any more.The last styles called section, subSection are never applied and title, subTitle, subSubTitle are applied but with wrong color.
Please Help me (please see below my code). I'm in v5.0
$path = $this->container->getParameter('kernel.root_dir') . '/../web/bundles/rffconcertationsrest/templates/report.docx';
$docx = new \Phpdocx();
$docx->importStyles($path, 'merge', array(
'title',
'subTitle',
'subSubTitle',
'section',
'subSection'
));
//variables are of course initialized
$docx->addText($title, array('pStyle' => 'title'));
$docx->addText($subTitle, array('pStyle' => 'subTitle'));
$docx->addText($subSubTitle, array('pStyle' => 'subSubTitle'));
$docx->addBreak(array('type' => 'page'));
$docx->addText($section1, array('pStyle' => 'section'));
$docx->addText($subSection11, array('pStyle' => 'subSection'));
$path = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/';
$fullPath = $path . 'test';
$docx->createDocx($fullPath);