Forum


Replies: 3   Views: 91
Php undefined array merging documents

Posted by admin  · 23-02-2025 - 10:09

Hello,

UPDATE: phpdocx 16 adds support to remote images when merging documents.

Thank you for providing the DOCX documents and highlighting the issue you encountered. The error arises due to missing support for remote images during the document merge process.

To resolve this, the simplest approach is to embed the images directly when generating the documents, rather than using remote URLs. When utilizing embedHTML and replaceVariableByHTML, ensure that the downloadImages option is set to true (which is the default value). It appears that this option may currently be set to false in your implementation.

Furthermore, we have incorporated support for remote images in the current testing branch of the MultiMerge class, which will be included in the next stable release of phpdocx.

Regards.