Slide Layout
Add Slide Layout to Presentation
Aspose.Slides also offer to add Layout slides in a presentation. There are cases when there is missing Layout slide in the presentation and once can now add the Layout Slides in a presentation. Each slide has unique Id and Layout slides are maintained inside presentation Masters. One can access the Layout slide either by Type or by Name. Aspose.Slides for C++ allows developers to add new Layout slides in the presentation. To add a Layout Slide, please follow the steps below:
- Create an instance of Presentation class.
- Access the Master Slide collection.
- Try to find existing Layout slides to see if the required one is already available in Layout Slide collection or not.
- Add a new Layout slide if the desired layout is unavailable.
- Add an empty slide with a newly added Layout slide.
- Finally, write the presentation file using the Presentation object.
In the example given below, we have added Layout Slides to Presentation.
Set Size and Type of Slide
SlideSize.Type and SlideSize.Size are the properties of presentation class which could be set or get as shown below in the example.
Set Footer Visibility inside Slide
To set footer in a slide using its index position in the slides collection of the presentation, please follow the steps below:
- Create an instance of Presentation class.
- Obtain a slide by its reference index.
- Set Footer visible by making slide footer placeholder visible.
- Set date-time placeholder visible by using SetDateTime method.
- Write the modified presentation file.
Set Child Footer Visibility inside Slide
To set footer and child footer a slide using its index position in the slides collection of the presentation, please follow the steps below:
- Create an instance of Presentation class.
- Obtain the master slide by using its index.
- Set Footer and child footer visibility by making master slide and all child footer placeholder visible.
- Set text to master slide and all child footer placeholder by using SetFooterAndChildFootersText method.
- Set text to master slide and all child date-time placeholder by using SetDateTimeAndChildDateTimesText method.
- Write the modified presentation file.
Set Slide Size with Respect to Content Scaling
You can also set the slide size by using it with different ways of content scaling. SlideSize.Type and SlideSize.Size are the properties of presentation class which could be set or get as shown below in the example.
Set Page Size when Generating PDF
Slides in presentation could be set as different paper sizes. The SlideSize.Type property and SlideSizeScaleType enumeration can be used to set the slide size. Developers can set size of slide as shown below in the example.