Forum


Replies: 3   Views: 2695
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');

 

Posted by admin  · 27-03-2017 - 12:06

Hello,

One of your images request a user and password when trying yo open it. phpdocx needs to be able to get the image (using any stream).

Which license and version of phpdocx are you using?

Regards.

Posted by abhay.pai  · 27-03-2017 - 12:12

Well, thanks a lot for reply.

i know one of my image is asking for authentication is there any solution for it ?

because am working on development phase authentication cannot be removed by any cause.

am still evaluating your trial version 6.5

Posted by admin  · 27-03-2017 - 12:30

Hello,

Yes, there's a solution for images that use authentication, but it's not available for the trial version. Meanwhile we recommend you to test using images publicly accesible.

After you have purchased a license, please send us an email to contact[at]phpdocx.com and we'll be able to help you.

Regards.