Forum


Replies: 7   Views: 2875
Replcevariablebyhtml is not available
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 rocky9988  · 27-11-2018 - 08:48

ReplceVariableByHTML is not available

Posted by rocky9988  · 27-11-2018 - 13:46

The trial version that I used, everything else can be generated, that is, it can't replace html.

Posted by rocky9988  · 27-11-2018 - 13:51

  • OKPHP version is 7.2.7
  • OKZip support is enabled.
  • OKDOM support is enabled.
  • OKXML support is enabled.
  • WarningYou must install Tidy for PHP if you want to use embedHTML in your Word documents.
  • OKmbstring is enabled.

Posted by admin  · 27-11-2018 - 14:47

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.

Posted by rocky9988  · 27-11-2018 - 14:49

 

Thanks very much:

It's tidy's problem.

Posted by rocky9988  · 27-11-2018 - 14:56

But when tidy is turned on, the Chinese language will be scrambled. How can we solve this problem?

Posted by admin  · 28-11-2018 - 07:30

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.