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

Free Support Forum - aspose.com

Saving PPTX to stream in java

Are there any examples available to save Aspose Slides PPTX as stream in JAVA, I see the old links aren’t functional anymore.


I suggest you to please try using following sample code.

  Presentation pres=new Presentation("test.pptx");
  File file = new File(path+"Generated-Presentation-table" + ".pptx");
  pres.save(new FileOutputStream(file), SaveFormat.Pptx);

Hi @mudassir.fayyaz

I have a Presentation(OBJ) which i want to save as a stream to return as a Http response and not as a file.


I have observed your comments. I like to inform that you can save as ByteArrayOutputStream then you don’t need a File to store the presentation.

ByteArrayOutputStream baos = new ByteArrayOutputStream();
 Presentation pres=new Presentation("test.pptx");
 pres.save(baos, SaveFormat.Pptx);