How to set slide size for PowerPoint after cloning and merging a PowerPoint slide in C#?
Steps to set slide size for PowerPoint after cloning and merging a PowerPoint slide using C#
using Syncfusion.Presentation;
//Open the existing source PowerPoint presentation.
using (Presentation? sourcePresentation = Presentation.Open(@"Template.pptx") as Presentation)
{ //Create a destination PowerPoint presentation.
using (Presentation? destinationPresentation = Presentation.Create() as Presentation)
{
//Set the source presentation slide size to the destination presentation slide size.
destinationPresentation.SlideSize.Type = sourcePresentation.SlideSize.Type;
destinationPresentation.SlideSize.SlideOrientation = sourcePresentation.SlideSize.SlideOrientation;
destinationPresentation.SlideSize.Width = sourcePresentation.SlideSize.Width;
destinationPresentation.SlideSize.Height = sourcePresentation.SlideSize.Height;
//Clone and merge the PowerPoint slides with PasteOptions.SourceFormatting.
foreach (ISlide slide in sourcePresentation.Slides)
destinationPresentation.Slides.Add(slide, PasteOptions.SourceFormatting);
//Save the PowerPoint Presentation.
destinationPresentation.Save("Output.pptx");
}
}Conclusion
I hope you enjoyed learning about how to check fonts available for conversion in .NET PowerPoint.
You can refer to our .NET PowerPoint feature tour page to know about its other groundbreaking feature representations. You can also explore our documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!