Forum


Replies: 3   Views: 2694
Embeddhtml is not working with the image...
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 abhay.pai  · 27-03-2017 - 11:40

Am Generating a Word Doc using testing sample of below code, but here am using two different images one (Image 1) is from open source google image and another (Image 2) is from my development box.

using following code i could only see the Image 1 but not Image 2 in the word file.

can you please suggest me where am i going wrong ?


require_once '../../../classes/CreateDocx.inc';

$docx = new CreateDocx();
$html .='

<p style="text-align:center" data-widget="image">Testing</p>

<!-- Image 2 Test -->
<p style="text-align:center" data-widget="image"><img width="200" height="263" style="width: 200px; height: 200px;" alt="" src="http://212.227.20.122/Lodgesummons-Version-2.2/sites/default/files/users/user3/miscellaneous/logo-catherine.png"></p>

<!-- Image 2 Test -->
<p style="text-align:center" data-widget="image"><img width="200" height="263" style="width: 200px; height: 200px;" alt="" src="http://imgsv.imaging.nikon.com/lineup/lens/zoom/normalzoom/af-s_dx_18-140mmf_35-56g_ed_vr/img/sample/sample1_l.jpg"></p>
';
$docx->embedHTML($html);

$docx->createDocx('example_embedHTML_1');