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. Image for the cookie policy date
close icon

How to scale images in essential pdf

Hi I'm trying to scale images to (400 widhth, 250 height). For this I'm using th efollowing code.IPDFImage image= doc1.Graphics.DrawImage(new PointF(0, 0), "C:\\map_sample.jpg");

but I cant set height and width of this image since they are read only properties. Please tele me how to set size of the image.
Thanks


1 Reply

VK Vinoth Kumar K Syncfusion Team December 18, 2007 09:02 AM UTC

Hi Raghu,

Thank you for your interest in Syncfusion Products.

How to set size of the image?

You can set the size of the image by using the below code snippet:

PdfGraphics g = page.Graphics;

//Setting the height, width of the image
g.DrawImage(jpg, 0, 0, 400,250);

Please refer the sample in the below link which illustrates the above:

http://websamples.syncfusion.com/samples/PDF.Windows/F70549/main.htm

Please let me know if you have any other questions.

Regards,
Vinoth



Loader.
Live Chat Icon For mobile
Up arrow icon