Forum


Replies: 1   Views: 933
Issues using replacevariablebyexternalfile with html containing images
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  · 16-11-2021 - 18:58

Hello,

The replaceVariableByExternalFile method uses altChunk tags. As explained on the API documentation page, this tag is supported only by MS Word 2007 or newer in Windows. Other DOCX readers don't support this tag, that has some limitations and as MS Word handles its contents, it can't be customized to change how it is displayed.

The recommended method to replace a placeholder by HTML is replaceVariableByHTML, that generates documents supported by all DOCX readers and can be customized using the available options.

We recommend you to use replaceVariableByHTML to get the best output and compatibility, but if you send to contact[at]phpdocx.con the HTML you are embedding using replaceVariableByExternalFile we'll do some tests with this method (replaceVariableByExternalFile).

Regards.