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

Free Support Forum - aspose.com

Remove LayoutSlideEx from MasterSlideEx

Hi Guys,

we are just evaluating to move to the new version of Aspose Slide for Java and for this reason testing our old code based on the 2.0.9 with the 7.2.0 . I have at the moment multiple issues, this is one:
We need to create an empty plain presentation and remove the LayoutSlideEx we do not need. In this specific case, the only one we need to keep is the second.

This is the code :

public static void prepareAsDocFamilyMaster(MasterSlideEx masterToBePrepared) {
//removeShapesFromSlide(masterToBePrepared, false);
Iterator layouts = masterToBePrepared.getLayoutSlides().iterator();

int counter = 0;
LayoutSlideEx theOnlyLayout = null;
LayoutSlideExCollection masterLayouts = masterToBePrepared.getLayoutSlides();

while (layouts.hasNext()) {
LayoutSlideEx layoutSlide = layouts.next();

if (counter == 1) {
removeShapesFromSlide(layoutSlide, null);
theOnlyLayout = layoutSlide;


if (theOnlyLayout != null) {

The “remove()” call produce an error : UnsupportedOperationException.

There is another way to delete the Layouts from a Master ? This code was working fine with the previous version .

Thanks for your time .

Best regards

Angelo Trozzo.

Hi Angelo,

Thanks for inquiring Aspose.Slides.

I have observed the requirement shared and regret to share that the requested support for removing the layout slides is unavailable in Aspose.Slides. I have created an issue with ID SLIDESJAVA-33831 as new feature request to further investigate the possibility of implementing the desired feature. 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,


thanks for your answer. I was just wondering how come this useful functionality was available in 2.9 and not in 7.2.0 . However can be possible do it using the .NET version ?



Hi Angelo,

I have been able to observe the feature working in case of Aspose.Slides for Java 2.9.x series. I have changed the issue type to regression and will share the feedback with you as soon as the issue will be resolved.

We are sorry for your inconvenience,

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

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