Forum


Replies: 7   Views: 2370
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 Bouillou  · 06-05-2019 - 10:05

Thank you very much for your support. Installing and enabling Tidy works with versions 5.5 and 9 Trial.

However, setting "font-size: initial" permitting to use the font size of the "Normal" style has a wird side effect because <p> are no longer considered as paragraph.

Could you try the code below?

<?php

require_once '../../../classes/CreateDocx.php';

$docx = new CreateDocx();

$docx->embedHTML('
<html>
<head>
</head>
<body style="color: red; font-size: initial;">

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