Converting ppt to pptx and reading and cloning that particular pptx

Hi Team!,

Using Aspose slides i getting the following issues so pls give advice.

pls considerd its very high priority........

Problem:

1) i took one x.ppt file and converted into x.pptx format using the following code.

Presentation pres = new Presentation(sourceFilePath.getInputStream());

pres.write(sourceFilePath2.getOutputStream());

2) After that i want to read the x.pptx for cloning purpose through the following code.

PresentationEx sourcex =new PresentationEx(sourceInputStream);

PresentationEx destinationx = new PresentationEx(destInputStream);//the following error is at this line

SlideEx SourceSlide= sourcex.getSlides().get(index);

com.aspose.slides.PptException: Unknown file format.
at com.aspose.slides.obfuscated.tx.(SourceFile:182)
at com.aspose.slides.pptx.PresentationEx.(SourceFile:1043)
at com.applabs.margePPT.utils.CommonPPTMarge.addSlidex(CommonPPTMarge.j
va:463)
at com.applabs.margePPT.actions.HomeAction.addImage(HomeAction.java:469

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

Thanks in Advance.......

L.R.Vijay Kumar

Hi Vijay,


I have observed the code snippet shared by you and have found inconsistency in that. You are actually trying to save PPT as PPTX using Aspose.Slides for Java. This feature is unavailable in Aspose.Slides for Java. The file that you have saved is in fact internally PPT but named as PPTX. If you ought to convert PPT to PPTX then please do this through PowerPoint.

Many Thanks,