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

I want the image more centered and and the text more on the right side.

Thread ID:





126406 Oct 14,2016 05:33 AM UTC Oct 17,2016 09:16 AM UTC ASP.NET MVC 1
Tags: DocIO
New Tester
Asked On October 14, 2016 05:33 AM UTC

At the moment my source code looks kind of this:

//Part 0 - Init
IWParagraph footerPar = new WParagraph(doc);
IWTable tablefooterPar = section.HeadersfooterPars.footerPar.AddTable();
RowFormat formatfooterPar = new RowFormat();

formatfooterPar.Borders.BorderType = BorderStyle.Single;

tablefooterPar.ResetCells(1, 2);

//Part 1 - Cell 1
footerPar = tablefooterPar[0, 0].AddParagraph() as WParagraph;
WPicture picturefooterPar = (WPicture)footerPar.AppendPicture(Image.FromFile(Path.Combine("...", "....png")));
picturefooterPar.VerticalAlignment = ShapeVerticalAlignment.Bottom;

(footerPar.Items[0] as WPicture).Width = 180.5f;
(footerPar.Items[0] as WPicture).Height = 25.75f;

 //tablefooterPar[0, 0].Width = 380;
//Part 2 - Cell 2
footerPar = tablefooterPar[0, 1].AddParagraph() as WParagraph;
IWTextRange txtfooterPar = footerPar.AppendText("\nsome text\nsome text\nsome text\n\nsome text\nsome text\nsome text\nsome text");
txtfooterPar.CharacterFormat.FontSize = 15;

tablefooterPar.TableFormat.HorizontalAlignment = RowAlignment.Center;
footerPar.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Left;

(tablefooterPar[0, 1] as WTableCell).CellFormat.VerticalAlignment = VerticalAlignment.Top;

I want the image more centered and  and the text more on the right side.

My requirements are:
- the text shall still have the alignment left
- I want  the entire cell to be moved more to the right
- the table shall use the entire width

I tried using something like this "tablefooterPar[0, 0].Width = 380;", but this changed also the entire table.

Maybe you can give me another solution ?

Sethumanikkam Yogendran [Syncfusion]
Replied On October 17, 2016 09:16 AM UTC

Hi Customer,

Thank you for using Syncfusion products.

On further analysing with the given details we suspect anyone of the following is your requirement.

1. Create a new table with 1 row and 2 cells. In first cell, inserted image should align in centre of the cell. In second cell, appended paragraph text should align in right of the cell.
2. Table width should have equivalent to width of the page.

Kindly provide your confirmation on the mentioned cases, thereby we will analyse further and will provided you appropriate solution.

For more details kindly refer following UG Link:

If we misunderstand your requirement then, kindly provide us Input document used (if any) and screenshot/output Word document of the expected result which will helpful to provide you the appropriate solution



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