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

Free Support Forum - aspose.com

Facing issue while cloning multiple layout from the different source to destination


I am generating the theme presentation file from the content slide. I am doing following functionality :

  1. Check content slide master exist in theme, if master does not exist then clone masters with its sub layouts.
  2. If master exist then check the content slide layout exist of that particular slide, if layout does not exist then clone the layout on the same master.

This functionality is working properly when I have iterated on one folder but I am facing issue while iterating on multiple folders using recursion function it is creating a default presentation.

I am using aspose slide java version 19.12.

Below zip contains :

  1. Code package.
  2. pptx folder from which I have to generate the Theme.

themeGenerator.zip (1.3 MB)

Can you please help where I am doing mistake for generating the Theme presentation file while iterating on multiple folders using recursion function?



If there any update on this? I have tried below function for iteration still I am facing issue. Is it Aspose API issue?

public void RecursivePrint(File folder) throws Exception{
System.out.println("In listAllfiles(File) method");
File[] fileNames = folder.listFiles();
for(File file : fileNames){
  // if directory call the same method again
    try {
      if(file.isFile() && file.getName().endsWith(".pptx")) {
          generateThemeFromContent(file.getAbsoluteFile(), downloadPath);
    } catch (IOException e) {
      // TODO Auto-generated catch block


Can you please elaborate the issue incurring on your end. Also, please do try using latest Aspose.Slides for Java 20.7 on your end too first.