Replies: 7   Views: 388
Replacevariablebyhtml css render with root tag not working
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 admin  · 06-05-2019 - 09:23


The previous script was tested using phpdocx Corporate 5.5, classic package. If we test the same script using phpdocx Corporate 5.5 namespaces package:


require_once 'phpdocx/5.5/namespaces/Classes/Phpdocx/Create/';

$docx = new Phpdocx\Create\CreateDocx();
<body style="color: red">

<p>This is a test.</p>
<p>Another test which must be separated in a specific paragraph.</p>
<p>And another</p>



The output is the same. We have opened the DOCX output with MS Word 2007 to MS Word 2016 and LibreOffice 6 using PHP 5.6, PHP 7.0, PHP 7.1 and PHP 7.2 and the style is correctly applied in all cases.

We recommend you to check if Tidy is installed and enabled, and test the same script using the trial package of phpdocx 9 ( And also test the samples available on the documentation page (