Forum


Replies: 6   Views: 1285
Not all images are in created document
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  · 24-11-2021 - 07:22

Hello,

embedHTML and replaceVariableByHTML methods download the images to be added (the downloadImages option is true as default, if this option is set as false then the images are not downloaded but added as external images) using the file_get_contents function from PHP. If the error is not always the same (the images not being added aren't the same for each execution of the script), maybe some image or the script are returning a timeout when downloading the files? Or the external server is retricting access to download them?

On https://www.phpdocx.com/documentation/cookbook/insert-images-html you can find some documentation about adding images from HTML.

We recommend checking the logs in your server and the remote server to check if the images are being readed correctly.

If you send the most simple script with a HTML sample you are transforming to contact[at]phpdocx.com we'll do some tests. If you also send a sample DOCX output with missing images (please as small as possible), we'll check it too.

Regards.