Hello,
replaceVariableByExternalFile and addExternalFile methods use altChunk tags that are only compatible with MS Word 2007 or newer.; LibreOffice (and also the conversion plugin) doesn't support this tag. This is explained on the API pages of these methods:
This method is not compatible with thephpdocx PDF conversion plugin.
And the conversion plugin information page (https://www.phpdocx.com/documentation/conversion-plugin/common-problems-and-possible-errors):
- altChunk tag: The addExternalFile and replaceVariableByExternalFile methods use the Word altChunk internal tag. This allows to insert external files in a Word document. This tag is MS Word supported only, so it's not compatible with the conversion plugin.
Instead of using altChunk tags, if you need to embed HTML please use embedHTML or replaceVariableByHTML methods. If you need to merge DOCX, please use mergeDocx. These methods are compatible with any DOCX reader.
Regards.