Repair Message Occurs after Cloning Attached Presentation

repair message occurs on cloning the attached (and is unrepairable if it appears in a more complicated 60+slide presentation)

  public static void main(String[] args) {

     Presentation inPres,outPres;
    int j;
    String dataDir;
    ISlide slide[];

    try {
         dataDir = new File(".").getAbsolutePath() + File.separator;
         inPres = new Presentation(dataDir+"in.pptx");              
         outPres=new Presentation();
         slide = inPres.getSlides().toArray();                               

         for (j = 0; j < slide.length; j = j + 1) {                                                                      
            outPres.getSlides().addClone(slide[j]);
         }
        
         outPres.save(dataDir + "out.pptx", SaveFormat.Pptx);
    }
    catch( Exception e){
        System.out.println("Error  Exception in code: "+e.getMessage());
        System.exit(1) ;
    }
}

in.zip (35.3 KB)

@JamesDriscoll

I have created an issue with ID SLIDESJAVA-38367 in our issue tracking system to further investigate the issue. Can you please share the complete PowerPoint version where you are getting repair message on opening the presentation along with generated file.

here’s the output from above code and ppt
out.zip (51.6 KB)

@JamesDriscoll

I have appended the information in our issue tracking system and we will share the feedback with you as soon as the issue will be fixed.

1 Like

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

1 Like

… outPres = new Presentation();

 outPres.getSlides().removeAt(0);     // remove first blank slide and any masters

adding 1 line to the above code (i.e. removing the 1st blank) will result in a broken PowerPoint again, output attached
out.zip (54.7 KB)

@JamesDriscoll

Can you please confirm, if you are using the same presentation file for which the issue has beeb resolved or its a different. If it is different, then please share the source file with us.

yes, the same file is in in.zip

@JamesDriscoll

I have added the information in our issue tracking system and will get back to you with feedback as soon as the issue will be fixed.

1 Like

I’m wondering if the slide cloning bug fix (filed as SLIDESJAVA-38440) has inadvertently also fixed this issue? Not having access the the code I can’t say for sure if/why that would be so.

@JamesDriscoll,
I am glad to inform you that the issues you described have already been resolved in Aspose.Slides 21.4. You should check it on your side.

1 Like