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

Resize Image

Thread ID:





102690 Feb 22,2012 06:52 AM UTC Feb 23,2012 10:35 AM UTC ASP.NET Web Forms (Classic) 1
Tags: PDF
Asked On February 22, 2012 06:52 AM UTC


I am using Syncfusion ver 9.4.I want to add the logo in word header document.The image which i am inserting should be 100*100 size.The image is displaying in original size.I want to resize original image to 100*100 size.Please provide me a sample code to resize image in header using AppendPicture().

Code is attached below

IWParagraph headerPar = new WParagraph(doc);
// Add a new table to the header
IWTable table = section1.HeadersFooters.Header.AddTable();
RowFormat format = new RowFormat();

// Setting Single table border style.
format.Borders.BorderType = Syncfusion.DocIO.DLS.BorderStyle.Single;
headerPar = new WParagraph(doc);

IWTextBox textlogo = headerPar.AppendTextBox(100, 80);
textlogo.TextBoxFormat.LineColor = System.Drawing.Color.White;

Poornima R [Syncfusion]
Replied On February 23, 2012 10:35 AM UTC

Hi Sudhan,

Thank you for your interest in Syncfusion Products.

Regarding your requirement of “Resizing the picture”, you can utilize Height and Width property if the WPicture class as in the below code. We have also prepared the sample illustrating the same. Please find the sample from the below link. Try running the sample and let us know if this meets your requirement.

Code snippet:
IWPicture picture = textlogo.TextBoxBody.AddParagraph().AppendPicture(Image.FromFile(txtTemplate2.Text));
//Set picture height
picture.Height = 100;
//Set picture width
picture.Width = 100;


For more information about picture formatting, please refer the below online documentation link.

Please let us know if you have any questions.



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