Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue Apr 05, 2016 6:54 pm

Hi,

I have a .swf file and I'm wondering what the C# code would be to embed this file.

So far, I have this:

...make HttpRequest and set up rectangle rect, also "slide" is a reference to presentation.Slides[0]
Stream stream = httpWebResponse.GetResponseStream();
Image testimg = Image.FromStream(stream);
var img1 = presentation.Images.Append(testimg);
byte[] bytes = System.IO.File.ReadAllBytes(Path + @"\Flash1.swf");
IOleObject flashObject = slide.Shapes.AppendOleObject("ShockwaveFlash.ShockwaveFlash.10", bytes, rect);
flashObject.SubstituteImagePictureFillFormat.Picture.EmbedImage = img1;
flashObject.ProgId = "ShockwaveFlash.ShockwaveFlash.10";

The image on top of the flash object shows up, but the animation is not playing.

Sorry I'm very novice, any help would be appreciated.

benmr
 
Posts: 6
Joined: Thu Mar 10, 2016 8:56 pm

Wed Apr 06, 2016 6:23 am

Hi,

Thanks for interest in our Spire.Presentation.
Please visit this tutorial to get sample code how to add video.
http://www.e-iceblue.com/Tutorials/Spir ... ument.html

At present the latest version is Spire.Presentation Pack Hotfix Version:2.5.21.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Wed Apr 06, 2016 7:25 pm

Why I try that method, this is the error I get with that Shockwave Flash file:
"The specified file cannot be played on the specified MCI device. The file may be corrupt, not in the correct format, or no fil."

benmr
 
Posts: 6
Joined: Thu Mar 10, 2016 8:56 pm

Thu Apr 07, 2016 1:42 am

Hi,

Thanks for your feedback.
To help us investigate your issue, please share your flash file. Thank you.
You can also send it to amy.zhao@e-iceblue.com.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Apr 07, 2016 3:53 pm

I've sent it to the email provided.

benmr
 
Posts: 6
Joined: Thu Mar 10, 2016 8:56 pm

Fri Apr 08, 2016 7:29 am

Hi,

I have received your .swf file. Thanks for providing. I have reproduced your issue and forwarded it to our dev team.
We will inform you when it is resolved.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue Apr 12, 2016 2:03 pm

Hi Amy,

Is there a status on this request? I'm interested in finishing a prototype that I wish to present.

Is there any alternative method I can use to append .SWF files?

Thanks,

Ben

benmr
 
Posts: 6
Joined: Thu Mar 10, 2016 8:56 pm

Wed Apr 13, 2016 3:06 am

Hi,

Our dev team is fixing the issue. We will tell you when it is resolved.
Sorry that now there is no alternative method.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri May 06, 2016 7:41 am

Hi,

Thanks for waiting.
Your issue has been resolved. Welcome to download and test Spire.Presentation Pack Version:2.6.
Sample code:
Code: Select all
string inputFile = @"1.swf";
string outputFile = @"1.pptx";
Presentation presentaion = new Presentation();
presentaion.Slides[0].Shapes.InsertVideoMedia(0, Path.GetFullPath(inputFile), new RectangleF(200, 200, 200, 200));
presentaion.SaveToFile(outputFile, FileFormat.Pptx2010);


Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue May 10, 2016 6:17 am

Hi,

How did Spire.Presentation Pack Version:2.6 work?
Thanks for your feedback in advance.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Presentation

cron