Forum


Replies: 6   Views: 5029
How to embed image linked in html?
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 honzakuchar  · 11-07-2011 - 16:57

Hi,
I need to embed image from HTML. I tried following:
- <img src="data:image/png;base64encodedImage" does now working :-(
- <img src="link to local disk" (it links file does not embed it)
- Then I tried MHT file format (MIME format, where is HTML + files + file list). It worked, but word alert that, document is broken. When I click repair, It worked.

Is it possible to [b]embed[/b] image that is simply linked in HTML?

Sincerely,
Jan Kuchaƙ

Posted by brieflogic  · 11-04-2013 - 12:13

I would love to know the answer to this as well.

thanks.

Posted by admin  · 11-04-2013 - 12:13

Hello,

Using the current version of phpdocx, the path of the images must be absolute, like http://www.domain.com/image.png.

Regards.

Posted by aladdin  · 02-10-2013 - 13:19

[quote=admin-phpdocx]



Using the current version of phpdocx, the path of the images must be absolute, like http://www.domain.com/image.png.



[/quote]



Yes, that technic works if you only want to show remote image in your word document when you have access to Internet. But how to EMBED a remote image like http://www.domain.com/image.png to document? Its very important, when creating a document with single addHTML() call.


Posted by elyazalee  · 02-10-2013 - 13:23

Hi,



 



When I use replaceTemplateVariableByHTML('contenu','block', $html); with $html content a "<img src='http://domaine.ext/picture.jpg'> 



=> don't work...



 


Posted by jorgelj  · 03-10-2013 - 09:03

Hello,



Please check included documentation and phpdoc. There's an option, downloadImages, that you must set to true to download the images.



Regards.