We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wrong load format detection for PPS files

Hi,

I’ve faced uncertainties in your API (Aspose.Slides for .NET version 21.4). I am trying to detect load format for my *.pps file using this code:

string input = @"C:\input.pps";

using (FileStream fs = new FileStream(input, FileMode.Open, FileAccess.Read))
{
    using (MyStream ms = new MyStream(fs))
    {
        PresentationFactory presentationFactory = new PresentationFactory();
        IPresentationInfo presentationInfo = presentationFactory.GetPresentationInfo(ms);
        Console.WriteLine(presentationInfo.LoadFormat);
    }
}

The problem is that I am using object “MyStream” which is my class inherited from System.IO.Stream. It seems like your PresentationInfo class detect LoadFormat wrong with my inherited stream, but works fine with standart Stream. When I pass MyStream to PresentationInfo - I receive wrong LoadFormat (ppt). When I pass standart System.IO.Stream - I receive correct LoadFormat (pps) (screenshoot, full code in Program.cs file and my *.pps file are attached).

CodeAndPpsFile.zip (124.8 KB)
image.png (848 Bytes)

@AlexBilakovskyi,
Thank you for the issue description. I reproduced the error and received the same result. I’ve logged the issue in our tracking system with ID SLIDESNET-42555. Our development team will investigate this case. You will be notified when it is fixed.

@AlexBilakovskyi,
Our development team investigated the issue. The PPS format differs from PPT only in the file extension. Thus, you can determine the PPS format only when loading from file or FileStream.