Formatting Issue while Cloning Powerpoint Slides with Aspose.Slides for .NET

Hi team,
I have one ppt file in that I want to create individual file for each slides.
Example: Main PPT file hase 10 slides then I’m creating 10 individual pptx file for each slide.
I am doing that using this code snippest.

Presentation destPresentation = new Presentation();
//For Break PPT
using (Presentation pres = new Presentation(@"D:\PPTPredefine.pptx"))
{
     // Loop through slides
     foreach (ISlide slide in pres.Slides)
     {

         // Create a new empty presentation
         using (Presentation newPres = new Presentation())
         {

             newPres.Slides[0].Remove();
 
             // Add slide to presentation
             newPres.Slides.AddClone(slide);
 
 
             // Save presentation
             newPres.Save(string.Format(@"D:\Output\Slide_{0}.pptx", slide.SlideNumber), SaveFormat.Pptx);
         }
     }
}

In new file I’m facing formatting issue I’m attaching File here.
Here I am also uploading the Other ppt for reference which is stylish.
After dividing this ppt in individual file I’m also facing formatting issue.

Formatting issue.png (274.9 KB)

Original and expected output.png (83.7 KB)
PPTS.zip (6.3 MB)

@Jayshiv,
Thank you for contacting support. I am working on the issue and will get back to you soon.

@Jayshiv,
Thank you for your patience. When you create a new presentation with Aspose.Slides, the default slide size is 720 x 540. The slides in the PowerPoint presentations you provided have different dimensions. Therefore, you should set the same slide dimensions in new presentations you are creating before cloning the slides. The following code snippet shows you how to do this:

using (Presentation presenation = new Presentation(inputFilePath))
{
    float slideWidth = presenation.SlideSize.Size.Width;
    float slideHeight = presenation.SlideSize.Size.Height;

    foreach (ISlide slide in presenation.Slides)
    {
        using (Presentation newPresentation = new Presentation())
        {
            newPresentation.Slides[0].Remove();

            newPresentation.SlideSize.SetSize(
                slideWidth, slideHeight, SlideSizeScaleType.DoNotScale);

            newPresentation.Slides.AddClone(slide);

            string outputFilePath = string.Format("Slide_{0}.pptx", slide.SlideNumber);
            newPresentation.Save(outputFilePath, SaveFormat.Pptx);
        }
    }
}

Slide Size|Aspose.Slides Documentation