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

Free Support Forum - aspose.com

Cloning slides between pptx presentations

I’m trying to clone a slide from one pptx presentation to the end of another pptx presentation.

I’m using the following code exactly as specified in the documentation:

PresentationEx pres1 = new PresentationEx(“c:/tmp/ppt/first.pptx”);
PresentationEx pres2 = new PresentationEx();
SlidesEx slds= pres2.getSlides();

slds.addClone(pres1.getSlides().get(0));
try {
pres2.write(“c:/tmp/ppt/merged.pptx”);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

However I get a NullPointerException on the slds.addClone call:
Exception in thread “main” java.lang.NullPointerException
at com.aspose.slides.pptx.SlidesEx.if(SourceFile:95)
at com.aspose.slides.pptx.SlidesEx.addClone(SourceFile:54)
at test.aspose.PptExTest.main(PptExTest.java:55)

I have verified that the presentation is valid, I have also verified that the returned slide in not null.


Hi Oded,

Thanks for your interest in Aspose.Slides.

I have observed the exception issue specified by you. However, in order to add the issue in our issue tracking system for resolution, I need to reproduce and investigate the issue on my end. For that please share your source presentation file, so that I may proceed further to help you out. Thanks in advance for your cooperation.

We are sorry for your inconvenience,

I have gotten the exact same error. I made two copies of the attached PPTX file and tried to clone slides from one onto the end of the other and got the mentioned error.

I am using aspose-slides-2.2.0-20100328 aspose-metafiles-1.6.1-20100110.jar and JAI 1.1.3

Edit for clarification: the PPTX was made using Office 2010.

Hi,

Thanks for your interest in Aspose.Slides.

I have been able to reproduce the issue as specified by you. I have obtained the NullPoineter exception while cloning the slides between presentations. However, if the slides are cloned with in same presentation, they are getting cloned successfully. An issue with ID 17321 has been created in our issue tracking system for further verification and resolution. This thread has been linked with the issue, so that you may be automatically notified, once the issue is resolved.

We are sorry for your inconvenience,

Will that notifcation be posted to this forum, or only to the OP privately? If the latter, please cc me (KeithBasile) on this notification. Thanks

Hi,

I would like to share with you that whenever an issue is resolved in any of product release, its automatic notification is posted in the respective forum thread to which the issue belongs to. So, as like normal forum updates, you will also receive the issue fixed update as well. Hope, it resolves your query.

Thanks and Regards,

Hi. Has this issue been resolved? My company is waiting for the fix before we purchase a license.

Hi Oded,

I have verified the issue with the latest release of Aspose.Slides for Java 2.3.0 and have not observed the NullPointerException while cloning the slides between presentations. Please follow this link to download the latest release of Aspose.Slides for Java 2.3.0 and share your worthy feedback with us.

Thanks and Regards,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.