Hi Aspose team,
I have tried to convert Embedded doc and xls object inside the word file to pdf.But I could not find any way to convert embedded ppt object to PDF?If I could able to save that embedded ppt file to some location I could then able to convert that to PDF.Your help will be much appreciated!Thanks much!!
--Anand
Hi Anand,
Thanks for your inquiry and sorry for the delayed response. Sure, you can extract the embedded Power Point object from inside the Word document by using the following code snippet:
Document doc = new
Document(@“c:\test\PptInDocx.docx”);
NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
int i = 0;
//Loop through all shapes
foreach (Shape shape in shapes)
{
if (shape.OleFormat != null)
{
if (!shape.OleFormat.IsLink)
{
//Extract OLE PowerPoint object
if (shape.OleFormat.ProgId == "PowerPoint.Show.12")
{
MemoryStream stream = new MemoryStream();
shape.OleFormat.Save(stream);
// Here you can use Aspose.Slides for .NET component
// to be able to convert PPT files to PDF
i++;
}
}
}
}
I hope, this will help.
Best Regards,