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

Free Support Forum - aspose.com

How to Convert MemoryStream to PPT in .NET

Hi,

Can you help me how to Convert MemoryStream to PPT in .NET

Hi there,


Thanks for your inquriy. Please note Aspose.Pdf for .NET converts PDF to PPTX. However if you need PPT output, then you can convert PPTX file to PPT with help of Aspose.Slides. Please check following code snippet to convert PDF MemoryStream to PPT with collaboration of Aspose.Pdf and Aspose.Slides, hopefully it will help you to accomplish the task.

Aspose.Pdf.Document
OutPutDocument = null;<o:p></o:p>

Aspose.Pdf.PptxSaveOptions pptx_save = null;

MemoryStream pdfMemoryStream = new MemoryStream();

MemoryStream inputStream = new MemoryStream(File.ReadAllBytes(myDir + "HelloWorld.pdf"), true);

MemoryStream intputMemStream = new MemoryStream();

inputStream.CopyTo(intputMemStream);

//Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(intputMemStream);

OutPutDocument = new Aspose.Pdf.Document(intputMemStream);

pptx_save = new Aspose.Pdf.PptxSaveOptions();

// Save resulting PDF document.

OutPutDocument.Save(pdfMemoryStream, pptx_save);

pdfMemoryStream.Position = 0;

//Convert PPTX to PPT

var presentation = new Aspose.Slides.Presentation(pdfMemoryStream);

presentation.Save(myDir + "pptxtopdf.ppt", Aspose.Slides.Export.SaveFormat.Ppt);


Please feel free to contact us for any further assistance.

Best Regards,