Forum


Replies: 7   Views: 2558
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 - 06:59

Hello,

We have run the following script using phpdocx 5.5:

$docx = new CreateDocx();
$docx->embedHTML('
<html>
<head>
</head>
<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>

</body>
</html>');

$docx->createDocx('output.docx');

And the color is applied correctly to all paragraphs. As you are using a template maybe it has some custom style or any other content that is overwriting the new contents/styles. We recommend you to check your template.

Regards.