Converting ppt to images
I want to convert ppt to images o开发者_如何学编程n the client machine and zip all the images and send it to the server.
I've read on many forums and found that it's not possible to convert ppt to images on the server where Office is not installed.
So, I had this thought if the conversion could be done in the client browser and sent to the server, using JQuery or any other client side technology.
Any example would be appreciated.
Thanks
Aspose.Slides for .NET allows you to convert the PPT slides to images on the server, without the need for Microsoft Office installed. You might want to give it a try, if that helps. It is a standard .NET assembly which can be used on the server, in your application. The conversion is simple, here is the sample code:
//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation("demo.ppt");
//Accessing a slide using its slide position
Slide slide = pres.GetSlideByPosition(1);
//Getting the thumbnail image of the slide of a specified size
Image image = slide.GetThumbnail(new Size(290, 230));
//Saving the thumbnail image in jpeg format
image.Save("C:\\thumbnail.jpg", ImageFormat.Jpeg);
Disclosure: I work as developer evangelist at Aspose.
Javascript generally doesn't have the capacity to modify files on the client machine and can't automate a file upload. You may be able to get the desired effect with a Java applet, I'm not sure. The alternative is to provide a stand-alone application that will do the conversion and zipping, then have the user upload the file manually.
Edit: As an afterthought, any reason you can't simply install Office on your server and do it there?
You have no control over the client machine once your html has been rendered and so you cannot achieve this. The user would have to do it manually.
精彩评论