Hi,
I am trying to convert a presnetation file (pptx) to page-wise images using following snippet, which is picked up from your documentation, but it gives file corrupt error as attached in the image file.
List<String> imagePaths = new List<String>();
//?? Gives error. Cannot convert. The file is corrupt or damaged.
var outputFileTemplate = outPath + "_{0}.png";
GroupDocs.Conversion.Contracts.SavePageStream getPageStream = page => new FileStream(string.Format("_{0}.png", page), FileMode.Create);
// Load the source PPTX file
using (GroupDocs.Conversion.Converter converter = new GroupDocs.Conversion.Converter(filePath))
{
// Set the convert options for PNG format
GroupDocs.Conversion.Options.Convert.ImageConvertOptions options = new GroupDocs.Conversion.Options.Convert.ImageConvertOptions { Format = GroupDocs.Conversion.FileTypes.ImageFileType.Png };
// Convert to PNG format
converter.Convert(getPageStream, options);
}
Screenshot 2022-09-14 130543.png (26.4 KB)
It works fine for same file while converting to pdf. Please suggest.
Regards,
Sarvesh.