Wrong load format detection for PPS files


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);

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)

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.

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.