Replies: 3   Views: 1902
How do i make a fixed width of an 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 Xardos  · 23-03-2016 - 13:03

Hello, i'm trying to set a fixed width of whatever image i'm inserting into docx file. I'm always recalculating height of the image but i wan't width to remain constant. However i always get images in docx file with different sizes despite that the parameter 'width' is always constant for each image. How can i fix it?

Posted by admin  · 23-03-2016 - 14:29


What version and license of phpdocx are you using?


Posted by Xardos  · 23-03-2016 - 16:15

PHPdocX 5.5 PRO

Posted by admin  · 23-03-2016 - 18:39

Edited by admin · 23-03-2016 - 19:10


You need to use these options: width, height, scaling and dpi; and even normalize the dpi of the images you're adding using ImageMagick or GD.

There's no license tied to your user. For further support please write to contact[at] and send in your message the username or email that owns the license.