An exception is thrown when i try to open a pptx file and immediately save it

An exception is thrown when i try to open a pptx file and immediately save it

Exception in thread “main” java.lang.ExceptionInInitializerError
at com.aspose.slides.tt.do(Unknown Source)
at com.aspose.slides.tr.(Unknown Source)
at com.aspose.slides.bho.for(Unknown Source)
at com.aspose.slides.bho.while(Unknown Source)
at com.aspose.slides.bgj.do(Unknown Source)
at com.aspose.slides.bgj.do(Unknown Source)
at com.aspose.slides.bgj.do(Unknown Source)
at com.aspose.slides.bgj.(Unknown Source)
at com.aspose.slides.TextFrame.do(Unknown Source)
at com.aspose.slides.AutoShape.do(Unknown Source)
at com.aspose.slides.AutoShape.do(Unknown Source)
at com.aspose.slides.GroupShape.do(Unknown Source)
at com.aspose.slides.Slide.do(Unknown Source)
at com.aspose.slides.Slide.do(Unknown Source)
at com.aspose.slides.Slide.getThumbnail(Unknown Source)
at com.aspose.slides.asi.try(Unknown Source)
at com.aspose.slides.asi.do(Unknown Source)
at com.aspose.slides.Presentation.do(Unknown Source)
at com.aspose.slides.Presentation.do(Unknown Source)
at com.aspose.slides.Presentation.save(Unknown Source)
at Test.main(Test.java:10)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at com.aspose.slides.p6a2feef8.pbdb106a0.bs.float(Unknown Source)
at com.aspose.slides.p6a2feef8.pbdb106a0.bs.for(Unknown Source)
at com.aspose.slides.pa2137a2a.p883e881b.r.if(Unknown Source)
at com.aspose.slides.pa2137a2a.p9f36407e.i.if(Unknown Source)
at com.aspose.slides.pa2137a2a.p9f36407e.i.int(Unknown Source)
at com.aspose.slides.pa2137a2a.p9f36407e.i.(Unknown Source)
at com.aspose.slides.pa2137a2a.p9f36407e.i.(Unknown Source)
… 21 more


The lines of code are:

public class Test
{
public static void main(String[] args)
{
Presentation pres = new Presentation(“D:\test.pptx”);
pres.save(“D:\output.pptx”, SaveFormat.Pptx);
}
}

The source file “test.pptx” is attached to this post



This message was posted using Email2Forum by Tahir Manzoor.

Hi Saeid,

Thank you for considering Aspose.

I checked your issue with the latest version of Aspose.Slides for Java v14.4.0 and I am unable to reproduce the issue using your shared file. If you are using an older version, I would suggest you to download and try the latest version and let us know if you still face the issue.

Thanks & Regards,

I still have this issue.
Using the latest Aspose Slides (14.4.) and JDK 1.7.0_51 (64 bit).

Do i need to have any license file set up in conjunction with the Aspose Slides jar file?
Please let me know if you need further information regarding this issue.

Thanks!

I just found that everything works as expected with the 32 bit version of the JDK…

Hi Saeid,

Thank you for the details.

We will verify the issue over the mentioned JDK version as well and will get back to you with results.

Thanks & Regards,

Hi Saeid,

My apologies for the delay in response.

I have tried the latest version of Aspose.Slides for Java v14.7.0 with JDK 1.7.0_51 (x64) version and it works fine. If you still facing any issue, please try the latest version and let us know if it works fine for you.

Thanks & Regards,