Forum


Replies: 3   Views: 817
Replaceplaceholderimage with stream useage example
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 arthurg  · 12-08-2020 - 10:32

Can anyone give me an example of replacePlaceholderImage useage but with stream not a path to file?

Posted by admin  · 12-08-2020 - 11:11

Hello,

You need to enable the streamMode option, for example:

$docx = new CreateDocxFromTemplate('examples/files/placeholderImage.docx');

$docx->replacePlaceholderImage('LOGO','https://www.phpdocx.com/img/logo_badge.png', array('streamMode' => true));

If you are adding a HTTPS image, please check the documentation available on https://www.phpdocx.com/documentation/cookbook/insert-images-html (From HTTPs section).

Regards.

Posted by arthurg  · 13-08-2020 - 06:25

Thank you.

Posted by arthurg  · 13-08-2020 - 12:01

Deleted by arthurg · 13-08-2020 - 12:04