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
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.Type = presentation.SlideSize.Type;
auxPresentation.SlideSize.Size = presentation.SlideSize.Size;
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
- [Codeplex](https://asposeslidesopenxml.codeplex.com/SourceControl/latest#Aspose.Slides Features missing in OpenXML/Working With Size and Layout/)
- Github
- Code.MSDN
For more details, visit Working With Slide Size and Layout.