Forum


Replies: 7   Views: 6185
Image in templage : size change
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 jeremie  · 10-07-2013 - 19:38

I can't use HTML since it produces an image smaller than the source image. The following code :



$docx->replaceTemplateVariableByHTML('image', 'inline', '<img src="logo-prospect-2.jpg" width="200" height="100" ></img>');



 



gives an image that is actually 155 x 80.



 



For using addTemplateImage, I need to know the size of the image in cm or the dpi. I only know the size of the image in pixels. How cant I convert from pixels to cm ?