Forum


Replies: 1   Views: 1892
No image appears within <td>
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 LEEJIHOON  · 27-09-2019 - 05:27

When embedHtml is used, no image appears in the <td>.

Image out of ticket comes out normally.

Is there a way to get an image inside a table using embedHtml?

using phpdocx 8.2

 

<table border="1" cellpadding="1" cellspacing="1" style="width:100%">
    <tbody>
        <tr>
            <td><img alt="" src="http://thumb.mtstarnews.com/06/2016/12/2016121909582047551_1.jpg" style="height:187px; width:400px"></td>
            <td><img alt="" src="http://thumb.mtstarnews.com/06/2016/12/2016121909582047551_1.jpg" style="height:187px; width:400px"></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>

Posted by admin  · 27-09-2019 - 06:31

Hello,
 
We have tested your HTML and it's working correctly, the image appears correctly in both cells. We recommend you to set the downloadImages option as true to download and add them instead of using external links that MS Word internal security can block:
 
$docx->embedHTML($html, array('downloadImages' => true));
 
Regards.