Resizing image

I create a chart programmatically and I save it as an image to use when I create a pdf. The issue is when I create a pdf, the chart is huge and only a portion of it displays on the pdf. I would like to either resize the image I read for the PDF or the chart before I save it as an image.
Thanks

1 Reply

SL Sowmiya Loganathan Syncfusion Team May 14, 2018 12:17 PM UTC

Hi Caleb, 

Thank  you for contacting Syncfusion support. 

We can insert an image in a PDF document with the specified size. Please refer the below code snippet for more details, 

            //Load the image from the stream 
            PdfBitmap image = new PdfBitmap(imageStream); 
 
            //Draw the image with the given width and height. 
            page.graphics.DrawImage(image, new PointF(0, 0), new SizeF(400, 400)); 

Please refer the below UG documentation link(Working with images) for your reference, 

Please try the above code snippet in your end and let us know whether it solves the issue. 

Regards, 
Sowmiya L 


Loader.
Up arrow icon