Forum


Replies: 6   Views: 194
Setdefaultfont method on existing document text
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 usman12  · 27-05-2022 - 13:32

ok, I have used the following code which works fine when I put 'type' => 'paragraph' but when I put 'type' =>  '*' then it does not work so how I can apply the font to all content? Please paste any code example if you can.

        $docx = new \Phpdocx\Create\CreateDocxFromTemplate($tempFilePath);

        $referenceNode = array(
            'type' => 'paragraph'
        );

        $docx->customizeWordContent($referenceNode,
            array(
                'font' => 'Times New Roman'
            )
        );


        $docx->createDocx($new_file_path);

Thanks for your patience and for helping me.

Regards,