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

Free Support Forum - aspose.com

Slide Height and Width


I am using aspose.slide dll's to read the presentation object (pptx).

I want to read the height and width of a particular side and set it as per my requirement.

How can i do so?



Hi Amit,

I like to share that the slide size is set on presentation level rather than for individual slides. Please use the following sample code to serve the purpose.

PresentationEx presentationEx = new PresentationEx(“D:\Aspose Data\TestResize.pptx”);
float currentHeight = presentationEx.SlideSize.Size.Height;
float currentWidth = presentationEx.SlideSize.Size.Width;

float heightSize = currentHeight - 130;
float ratioHeight = heightSize / currentHeight;

presentationEx.SlideSize.Type = SlideSizeTypeEx.Custom;

presentationEx.SlideSize.Size = new SizeF(new PointF(currentWidth, heightSize));

Many Thanks,