Forum


Replies: 3   Views: 1936
Parsestyles returns a php notice
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

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');
}