We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

OleObjectFrame data + flv

Hi

Trying to export the oleobjectframe object (shock wave Active X object ) from the PPT to the corresponding movie object. Could you please help on this.

Presentation presentation = new Presentation(“temp1.ppt”);
int totalSlide = presentation.Slides.LastSlidePosition;
for (slideIdx = 1; slideIdx <= totalSlide; slideIdx++)
{
Aspose.Slides.Slide slide = presentation.GetSlideByPosition(slideIdx);
foreach (Aspose.Slides.Shape currentShape in slide.Shapes)
{
if (currentShape is OleObjectFrame)
{
Aspose.Slides.OleObjectFrame oleObjectInfo = (Aspose.Slides.OleObjectFrame)currentShape;
if (oleObjectInfo.ObjectClassName == “Shockwave Flash Object”)
{
byte[] activeXData = oleObjectInfo.ObjectData;
Stream outputStream = new FileStream(“c:\temp\test1.flv”, FileMode.Create);
outputStream.Write(activeXData, 0, activeXData.Length);
}
}
}
}

Thanks and regards
Parthiban.J

Hi Parthiban,

You can first debug your slide to find out the OLE object properties like ObjectClassName, ObjectProgID and then apply the condistional statements. If problem persisits, provide the PPT for investigation.

Hi

Pretty sure about the code. Double checked it. Its fine. The resulting SWF is not playing.

Attached file includes
temp1.ppt
temp.swf (embeded SWF in the PPT)
result.SWF (the exported SWF file from the PPT)
ole.cs (source code)

Let me know.

With regards
Parthiban.J

Hi,

There is definitley problem in writing the stream to file as your code only creates a file and does not write stream.

Hi

I beleive the last line outputStream.Write(activeXData, 0, activeXData.Length);.
does write the stream. If you mean to say outputStream.Flush() outputStream.Close() is missing I have tried that also.(that was a copy/paste problem in the file i sent)

Please correct me where i am going wrong.

With regards
Parthiban.J


Hi,

There is some problem with Flash files when read / written as OLE using Aspose.Slides. An issue with issue id 11746 has been created and you will be informed as soon as it is fixed.

Hi msabir,

Could you please move this to the priority support forum as we have procured priority support recently. And let us know the ETA for this.

Thanks and regards

Parthiban.J