We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Calculate Image Size and Resizing Image to Fit in Page in Word Document using C#

Although this an old post, I think that code is wrong. It should say:

[code]
if (ratioWidth > ratioHeight)
targetHeight = (targetHeight * (ratioHeight / ratioWidth));
else
targetWidth = (targetWidth * (ratioWidth / ratioHeight));
[/code>

@kristofferjalen,

Unfortunately, your question is not clear enough therefore we request you to please elaborate your inquiry further by providing the complete details of your usecase. This will help us to understand your scenario, and we will be in a better position to address your concerns accordingly.