Forum


Replies: 3   Views: 126
Parsestyles returns a php notice

Posted by pwctechnicalsecurity  · 30-07-2019 - 20:33

PS: I am using Symfony4. The example in examples/LayoutAndGeneral/parseStyles/samples_3.php seems to be working. This is the actual code in my controller.

use Phpdocx\Create\CreateDocx;

 

/**
 * @Route("/parse")
 */
public function parse()
{
    $url = $this->getParameter('kernel.project_dir') . '/public/examples/stylesTemplate.docx';

    $docx = new CreateDocx($url);

    $docx->parseStyles();

    $docx->createDocx('parse.docx');
}