Hi Mudassir,
I have reviewed ,y code and tried to use as suggested by you.
I have difference in below line
public byte[] SavePresentation()
{
try
{
using (MemoryStream presentationStream = new MemoryStream())
{
ProcessingPresentation.Write(presentationStream);
}
return presentationStream.ToArray();
}
}
catch (Exception)
{
throw;
}
}
;
;
;
;
File.WriteAllBytes(@“Output/Default MSPPT_potx.pptx”, slides.SavePresentation());
I have to return bytes as i need to store generated pptx in database/ or over network.
Please try to use above 2 line to save document on disk.
If you change file extension from .pptx to .potx it is opening properly.
Hope you are clear about cause of issue.
Please find attached screenshot for error.
If you note the bytes written to memorystream and filestream, difference is 2KB.
Thanks and regards,