Forum


Replies: 1   Views: 3453
Replacetemplatevariablebyhtml does not work
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 Sajid  · 18-02-2016 - 02:22

Hi, we are using phpdocx 3.7 pro and its working perfectly fine with our old application.

We are upgrading application to a newer version and trying to use the extacly same code from the old application but replacteTemplateVariableByHTML does not replace any variable in the generated docx.

However, if we use addTemplateVariable(), it replaces the variable by text but we need to use the html version.

 

Any suggestion would be appreciated.

Thanks

Posted by admin  · 18-02-2016 - 07:35

Hello,

We have done some tests and everything is working fine. Please run the included sample in examples/Templates/replaceVariableByHTML and check the output. Maybe Tidy is missing on your server or there're something wrong on the script you're running?

If you still have the issue please post (or send to contact[at]phpdocx.com) the most simple script that illustrate the issue.

Regards.