Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Fri Aug 16, 2019 1:31 am

Presentation presentation = new Presentation();
Stream stream = new MemoryStream(ssppt);
presentation.LoadFromStream(stream, FileFormat.Pptx2013);
int count = 1;
foreach (ISlide slide in presentation.Slides)
{
byte[] bytes = null;
var img = slide.SaveAsImage();
using (var ms = new MemoryStream())
{
img.Save(ms,ImageFormat.Jpeg);
bytes = ms.ToArray();
}
RCImageItemRecord imageRC = new RCImageItemRecord();
STImageItemStructure imageST = new STImageItemStructure();
imageST.ssImageBinary = bytes;
imageST.ssImageName = "Slide_" + count + ".jpg";
count++;
imageRC.ssSTImageItem = imageST;
imageList.Add(imageRC);

}

Im using the code above to convert slides to images but some images are broken.

cmenguito
 
Posts: 1
Joined: Thu Aug 15, 2019 8:57 am

Fri Aug 16, 2019 1:57 am

Hi,

Thanks for your inquiry.
Please provide your input PPT file for testing and further investigation.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Presentation