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

Free Support Forum - aspose.com

PPT Reading Failure. ArgumentOutOfRangeException: Cannot Be Negative

b.zip (9.2 MB)
When read this ppt, throw this exception:

com.aspose.slides.exceptions.ArgumentOutOfRangeException: Cannot be negative.

Here is my code

Presentation pres = new Presentation("C:\Users\123\Desktop\b.ppt");

How to solve this problem?

@jingyao066,
Thank you for reporting the issue.

I’ve reproduced the problem with loading the presentation and added a ticket with ID SLIDESJAVA-38889 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate the case. You will be notified when the issue is resolved. Unfortunately, I don’t see a workaround for the case.

It would be great if you could share the following additional information:

  • OS version where the code was executed
  • JDK version in your app

We will then also test a solution in an environment similar to yours.

My OS version is windows 10.
This problem also occurs in Linux systems.
JDK version is 1.8.0_292

@jingyao066,
Thank you for the additional information. I’ve forwarded it to our developers.

The issues you have found earlier (filed as SLIDESJAVA-38889) have been fixed in Aspose.Slides for Java 22.9 (ZIP).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.