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:

if (ratioWidth > ratioHeight)
targetHeight = (targetHeight * (ratioHeight / ratioWidth));
targetWidth = (targetWidth * (ratioWidth / ratioHeight));


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.