Reading .ppt throws exception

Hi!
Using slides 8.4.0 for Java on a 64 bit windows 7 machine, this code
try {
presentation = new Presentation(inputStream);
} catch (final Exception e) {
presentation = null;
System.err.println("Presentation exception:" + e.getMessage());
return false;
}
throws an exception, saying "Can't read MSCDFileSystem."

We've tried with several PPT files, one of which is attached to this post. This has worked before, so we can't really figure out what has changed and why this error suddenly pops up. All of the tested files open fine in Powerpoint.

A stack trace for the above exception:


Presentation exception:[Ljava.lang.StackTraceElement;@192563a
com.aspose.slides.PptReadException: Can’t read MSCDFileSystem.
at com.aspose.slides.Presentation.int(Unknown Source)
at com.aspose.slides.Presentation.do(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at se.sjv.commons.fileconversion.converter.pdfa.PresentationConverter.supports(PresentationConverter.java:54)
at se.sjv.commons.fileconversion.converter.BaseConverterFactory.getConverter(BaseConverterFactory.java:22)
at se.sjv.commons.fileconversion.DocumentConversionManager.convert(DocumentConversionManager.java:61)
at se.sjv.commons.fileconversion.DocumentConversionManagerTest.convertIntoStreamableDocument(DocumentConversionManagerTest.java:69)
at se.sjv.commons.fileconversion.DocumentConversionManagerTest.convertPoswerpoint(DocumentConversionManagerTest.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at com.aspose.slides.kr.break(Unknown Source)
at com.aspose.slides.kr.(Unknown Source)
at com.aspose.slides.kv.byte(Unknown Source)
at com.aspose.slides.kv.new(Unknown Source)
at com.aspose.slides.kv.(Unknown Source)
at com.aspose.slides.asa.do(Unknown Source)
at com.aspose.slides.asa.(Unknown Source)

Hi Eddie,

I have tried accessing the presentation file shared by you using Aspose.Slides for Java 8.7.0 and have been able to access that without any issue. I suggest you to please try using the specified version on your end and share with us if there is any issue on your end.

Many Thanks,

I get the same error with 8.7.0


/E

Hi again,

I’m not sure if it is of any consequence, but our system works with streams, exclusively, not files. The input stream comes from an internet connection, so timing of the dataflow may vary

/E

Hi Eddie,

I checked your issue with the latest version of Aspose.Slides for Java v8.7.0 and I am unable to reproduce the issue.I would suggest you to create a simple application in Java and use the below code to see if you still face any issue. This will help in identifying whether the issue is with Aspose.Slides or in implementation at your end.

Presentation presentation;
try
{
File file = new File(“D://Data//Test.ppt”);
FileInputStream inputStream = new FileInputStream(file);
presentation = new Presentation(inputStream);
}
catch (Exception e)
{
presentation = null;
System.err.println(“Presentation exception:” + e.getMessage());
}