I can't create PDF from a pptx (PowerPoint 2007) presentation.
When the following code is executed, new Presentation(slide) causes the error: "Invalid header signature; read 1688935826934608, expected 16220472316735377360":
private static MemoryStream PowerPointToPdf(MemoryStream slide)
{
global::Aspose.Slides.Presentation ppt;
MemoryStream pdfContent;
try
{
slide.Position = 0;
pdfContent = new MemoryStream();
ppt = new Presentation(slide);
ppt.SaveToPdf(pdfContent);
pdfContent.Position = 0;
return pdfContent;
}
catch (Exception ex)
{
System.Reflection.MethodBase methodBase = System.Reflection.MethodBase.GetCurrentMethod();
throw new Exception(methodBase.DeclaringType.ToString() + "." + methodBase.Name + ": " + ex.Message);
}
}
Any idea what might be the reason? I'm running Aspose.Slides 2.8.7.0.
Any help will be welcomed
Bengt
Key2Know