We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Align a Table to the Center?

Hi @mudassir.fayyaz ,
Is there an option to center-align a table, not the cells?

@abin.t,
Thank you for contacting support.

Using Aspose.Slides, you can align tables and any shapes in a PowerPoint presentation like this:

var slideSize = presentation.SlideSize.Size;

var shape = presentation.Slides[0].Shapes[0];

// Horizontal alignment.
shape.X = (slideSize.Width - shape.Width) / 2;

// Vertical alignment.
shape.Y = (slideSize.Height - shape.Height) / 2;
1 Like