Forum


Replies: 2   Views: 1011
Add image size error
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 services_npod  · 14-03-2017 - 20:58

Hello, I am using the advanced 6.5 version of the license and I have a problem that happens with some images. I use the addImage method with width = 288 and height = 216 but some images appear larger in the docx I generate.

This image: https://dev-or.s3.amazonaws.com/dev/Slide/9379/iconlist.jpg?1331844575 works well

This image: https://dev-or.s3.amazonaws.com/dev/Slide/9380/iconlist.jpg?1331844575 works bad.

 

I download images to a temporary path before using it.

$thumb = array('src' => "/var/tmp/image.jpg", 'imageAlign' => 'center', 'height' => 216, 'width' => 288);

$docx->addImage($thumb);

Any idea what's going on?

Thank you.