Cloning Slide Problem

Hi,

I am using Aspose.Slides 2.2.0, when I try to clone the slide from one presentation to another presentation (2007 format). It is throwing the following expection.

Error message:-

java.lang.NullPointerException
at com.aspose.slides.pptx.SlidesEx.if(SourceFile:95)
at com.aspose.slides.pptx.SlidesEx.addClone(SourceFile:54)
at com.bhargav.Presentation2007Support.createCloneSlide(Presentation2007Support.java:84)
at com.bhargav.Presentation2007Support.main(Presentation2007Support.java:105)

Code Snippet:-

public void createCloneSlide(int slidePosition) {

try {

PresentationEx objNewPresentation = new PresentationEx();
PresentationEx objPresentation = new PresentationEx(filePath + "\\" + fileName);

SlideEx objSlide = objPresentation.getSlides().get(slidePosition);
if ( objSlide != null ) {
SlidesEx objSlidesCollection = objNewPresentation.getSlides();
if ( objSlidesCollection != null ) {
objSlidesCollection.addClone(objSlide);
}
}

System.out.println("Writing New Presentation [ClonePresentation.pptx]");
objPresentation.write(filePath + "\\ClonedPresentation.pptx");

System.out.println("Completed Cloning Slide...");
System.out.println("Closing Presentation [" + fileName + "]");
objPresentation = null;
}
catch(Exception ex) {
ex.printStackTrace();
}

}

Hi Nataraj,

Thanks for your interest in Aspose.Slides.

I have been able to reproduce the issue as specified by you. In order to investigate and resolve the issue an issue with ID 15870 has been created in our issue tracking system. This thread has also been associated with the issue, so that you may be notified automatically, once the issue is resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as 15870) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.