Ok I finally succeed to generate the template. Now how can I apply my custom styles that are generate in my template (if I understood) ? Have I to load it the template (if so how ? With CreateDocFromTemplate or other?) ?
public function generate() {
$this->generateTemplate();
// Create a new document
$docx = new \Phpdocx();
}
private function generateTemplate()
{
// Create a new document
$docx = new \Phpdocx();
// Imports style from the template
$path = $this->container->getParameter('kernel.root_dir') . '/../web/bundles/rffconcertationsrest/templates/report.docx';
$docx->parseStyles($path);
$uploadPath = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/';
$docx->createDocx($uploadPath.'templateParseStyles');
}