We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

image resize

Thread ID:





76008 Aug 19,2008 08:17 PM UTC Aug 20,2008 09:25 AM UTC ASP.NET Web Forms (Classic) 1
Tags: DocIO
peter crymble
Asked On August 19, 2008 08:17 PM UTC


I have a word template - i added images in and I use the following code to size them:

Dim pic6 As IWPicture = CType(IIf(TypeOf bk.InsertParagraphItem(ParagraphItemType.Picture) Is WPicture, bk.InsertParagraphItem(ParagraphItemType.Picture), Nothing), WPicture)
pic6.LoadImage(System.Drawing.Image.FromFile(dataPath2 & dr("image6")))

pic6.WidthScale = 16.83F

pic6.HeightScale = 16.83F

That works fine - but what is 'F'? I have a problem where by pictures of different resolutions display at different size. So two images 200x200pixels may display differently depending on the resolution. Is there any way to resize using mm or cm?


Bhuvaneswari P [Syncfusion]
Replied On August 20, 2008 09:25 AM UTC

Hi Peter,

Thank you for your interest in Syncfusion products

In the point specification ‘F’ represents the float value. We can set the DocIO units as only points. You have to convert from other unit to pixel. You can make use of PointsConverter.FromCm(1) class to convert the other units[cm] to points while setting the height and width of the image. Please use the Picture height and width property to set the image size.

float a=PointsConverter.FromCm(10);
picture.Height = a;
picture.Width = a;

Please let us know if you have any other questions.

Best Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon