Working with Size and Layout of Presentation
Contents
[
Hide
]
SlideSize.Type and SlideSize.Size are the properties of presentation class which could be set or get as shown below in the example.
Example
using Aspose.Slides;
string FilePath = @"..\..\..\Sample Files\";
string FileName = FilePath + "Working With Size and Layout.pptx";
//Instantiate a Presentation object that represents a presentation file
Presentation presentation = new Presentation(FileName);
Presentation auxPresentation = new Presentation();
ISlide slide = presentation.Slides[0];
//Set the slide size of generated presentations to that of source
auxPresentation.SlideSize.SetSize(presentation.SlideSize.Size.Width, presentation.SlideSize.Size.Height, SlideSizeScaleType.DoNotScale);
auxPresentation.Slides.InsertClone(0, slide);
auxPresentation.Slides.RemoveAt(0);
//Save Presentation to disk
auxPresentation.Save(FileName, Aspose.Slides.Export.SaveFormat.Pptx);
Download Sample Code
Download Running Example
For more details, visit Change the Presentation Slide Size in .NET.