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

Free Support Forum - aspose.com

Exception in thread "main" java.lang.NegativeArraySizeException

i am using aspose.slides.2.6.0.jar for pptx to pdf conversion.
i used the sample code provided by you
but i m getting some run time exception.
Exception in thread “main” java.lang.NegativeArraySizeException near
Presentation p=new Presentation(“sample.pptx”);

can u help me regarding this issue?

Hi Dhruba,


Thank you for posting.

I have observed your comments and like to share with you that you are using a legacy API which has been discontinued since long. Support is provided on basis of latest version which is Aspose.Slides for Java 15.11.0. Please try using Aspose.Slides for Java 15.11.0 on your side and then share your kind feedback with us.

Please let us know if the issue persists. We will be glad to assist you further.

Best Regards,

Hi Dhruba,


Thanks for inquiring Aspose.Slides.

I have observed the information shared by you and you are using a very old version of Aspose.Slides for Java that is no longer supported. I request you to please try using Aspose.Slides for Java 15.11.0 on your end which is latest available version to date. I hope this will be helpful. If there is still an issue then please share sample presentation with us so that I may investigate that further on my end.

Many Thanks,

Hi Mudassir ,

I used the latest jar(aspose slides for java 15.11.0).But still there is an issue.
I am getting the following error.
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
My source code is:
Presentation pres = new Presentation(“C:\Users\DURA<wbr>\Desktop\Hello.pptx”);
pres.save(“C:\Users\DURA\Desktop\demo.pdf”, SaveFormat.Pdf);



Hai Mudassir,

I used the latest jar(aspose slides for java 15.11.0).But still there is an issue.
I am getting the following error.
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
My source code is:
Presentation pres = new Presentation(“C:\Users\DURA<wbr>\Desktop\Hello.pptx”);
pres.save(“C:\Users\DURA\Desktop\demo.pdf”, SaveFormat.Pdf);


PFA for the pptx file.
Thanks

Hi Dhruba,

I have observed the comments shared by you and it seems that now you are getting OutOfMemory exception after using Aspose.Slides for Java 15.11.0 on your end. I have worked with your presentation using specified version and have been able to generated PDF without any issue. For your kind reference, generated PDF has also been attached. I suggest you to please increase java heap size on your end in your application and I am hopeful things will work.

Many Thanks,