Reading and Writing Doughnut Chart Generates a Corrupted PPTX File in Java

I have simple program

public class slidesTest {

  public static void main(String[] args) throws IOException {
    Presentation template = load("DonutChart.pptx");
    template.save("DonutOut.pptx", SaveFormat.Pptx);
  }

  private static Presentation load(String path) throws IOException {
    Presentation presentation;
    try (FileInputStream is = new FileInputStream(path)) {
      presentation = new Presentation(is);
    }
    return presentation;
  }
  
}

That reads a one doughnut slide from a pptx file, and then writes it to another file (without any manipulation)
The resulting file is corrupt, and PPT cannot read it.

Attached is the input file
slides.zip (18.4 KB)

@abelfer,
Thank you for contacting support.

Unfortunately, I was unable to reproduce the problem you described. Please check your results using the latest version of Aspose.Slides for Java if possible. If the issue persists, please share the following information:

  • OS version on which the code was executed
  • JDK version in your app
  • Aspose.Slides version you used
  • output PPTX file

OS - Linux 6.2.0-35-generic #35~22.04.1-Ubuntu
JDK - openjdk 17.0.8.1 2023-08-24
OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
Aspose Slides Version - 23.1
Output file:
PieOut.zip (30.0 KB)

@abelfer,
Thank you for the additional information. I am working on the issue and will get back to you as soon as possible.

@abelfer,
I’ve reproduced the problem you described, but with Aspose.Slides for Java 23.10 the problem does not occur. We recommend that you use the latest version of Aspose.Slides for Java.

You can also check the problem here: