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

Free Support Forum - aspose.com

How to get Presentation or Slide aspect ratio

I have been searching and trying, but I cannot figure out how to READ, not set a presentation’s or slides Height and width. I need to calculate the aspect ratio. SlideSize is deprecated and all the old posts I find with reference to that is not valid any longer.


Hi Jason,

I have observed your requirements and like to share that you can get the slide size using following sample code. The pres object in code is instance of of Presentation class.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.5px Helvetica} span.s1 {color: #0433ff}

double dWidth= pres.SlideSize.Size.Width;

double dHeight = pres.SlideSize.Size.Height;

You can use the width and height to calculate the aspect ration as well

Many Thanks,