ReplceVariableByHTML is not available
Hello,
What version and license of phpdocx are you using?
The replaceVariableByHTML method (https://www.phpdocx.com/api-documentation/templates/replace-variable-html-Word-document) is available in all licenses.
Regards.
The trial version that I used, everything else can be generated, that is, it can't replace html.
Hello,
You need to install and enable the Tidy extension for PHP. And also check you are writing the method name correctly.
The Tidy requirement is explained in the check.php output:
Warning You must install Tidy for PHP if you want to useembedHTMLin your Word documents.
And on the doc pages of the method:
https://www.phpdocx.com/documentation/introduction/html-to-word-PHP
https://www.phpdocx.com/documentation/cookbook/convert-html-to-word
https://www.phpdocx.com/api-documentation/templates/replace-variable-html-Word-document
As you are using the trial package, please check the documentation and the included samples.
Regards.
But when tidy is turned on, the Chinese language will be scrambled. How can we solve this problem?
Hello,
As you can read on the documentation pages, you also need to install and enable the PHP mbstring extension. All languages are tested and working with all methods of phpdocx, as you are using the trial package, please read the documentation and check the included samples.
Regards.