package slides.addslides;
import com.aspose.slides.ISlideCollection;
import com.aspose.slides.Presentation;
import com.aspose.slides.SaveFormat;
public class AsposeAddLayoutSlides
{
public static void main(String[] args) throws Exception
{
//Instantiate Presentation class that represents the presentation file
Presentation pres = new Presentation();
//Instantiate SlideCollection calss
ISlideCollection slds = pres.getSlides();
for (int i = 0; i < pres.getLayoutSlides().size(); i++)
{
//Add an empty slide to the Slides collection
slds.addEmptySlide(pres.getLayoutSlides().get_Item(i));
}
//Do some work on the newly added slide
//Save the PPTX file to the Disk
pres.save("data/LayoutSlidesAdded_Aspose.pptx", SaveFormat.Pptx);
//Printing the status
System.out.println("Slides added successfully!");
}
}