I have a presentation with two slides. Each slide has a few shapes. After removing the second slide by
presentation.getSlides.removeAt(1) and storing the presentation I get an warning from Powerpoint 2010.
Opening the presenation with Powerpoint 2003 is OK.
Powerpoint 2010 says that it has to remove some things. After PPT 2010 cleans the presentation it could be opened and there are no differences to the original presentation.
I think the problem is that removing a slide won’t remove the shapes. To solve this problem you have to remove all shapes before removing the slide. This workaround work’s fine for me.
I used aspose-slides-2.9.5-java and a ppt-file as presentation.
Hi Hans,
Thanks for your interest in Aspose.Slides.
I have observed the issue shared by you and like to share that shape collection is part of particular slide. When you remove a particular slide the respective shapes inside that are automatically removed and you need not remove the shapes independently. As far as the issue of warning message appearing, I would request you to please share the source presentation along with the code snippet that you are applying on the presentation. Please also share the PowerPoint version that you are using on your end and that is giving the warning message.
I will further investigate the issue on my end based on information shared by you to help you further. I will really appreciate your cooperation in this regard.
Many Thanks,
I attached the Powerpoint Sheet.
I tried to open it with Powerpoint (german) version 14.0.6029.1000
The following code will cause the problem:
Presentation ppt = new Presentation(new FileInputStream(“F:/TestPPT.ppt”));
ppt.getSlides().removeAt(1);
ppt.write(new FileOutputStream(“C:/test.ppt”));
This is my workaround:
Presentation ppt = new Presentation(new FileInputStream(“F:/TestPPT.ppt”));
Slide slide = ppt.getSlideByPosition(2);
while (slide.getShapes().size() > 0) {
for (int i = 0; i < slide.getShapes().size(); i++) {}slide.getShapes().removeAt(0);}
ppt.getSlides().removeAt(1);
ppt.write(new FileOutputStream(“C:/test.ppt”));
I hope you will be able to reproduce my problem.
Good luck
Hi Hans,
Thanks for sharing the complete details about the issue. I have been able to reproduce the same behavior as shared by you on my end. It seems to be an issue with Aspose.Slides and an issue with ID SLIDESJAVA-33461 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.
We are sorry for your inconvenience,
The issues you have found earlier (filed as SLIDESJAVA-33461) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.