2

I have an ASP.NET C# web application where users can upload their PowerPoint presentations(ppt files). I want programmatically (with C#), to call a power point presentation and be able to present it from a webpage. Is it possible? And how can I do this?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Equilibrium
  • 163
  • 2
  • 15
  • You need to rewrite PowerPoint in Javascript. Good luck. – SLaks Feb 22 '13 at 19:48
  • 1
    Do you mean actually run the PPT from the webpage? Or download it from there and use the user's copy of PowerPoint to run it? – System Down Feb 22 '13 at 19:51
  • 1
    @SLaks I have see some sites, that reads the PP, renders each page on image, and then play the image one by one. So maybe a converter to images can do the job. – Aristos Feb 22 '13 at 19:53
  • 1
    Google Drive does that for example. They just show images, no animations or transitions. – Eric J. Feb 22 '13 at 19:54
  • No my question is how I can display it online. For example if a user haven’t an ms office suite or open office in his machine can access the presentation with a browser. – Equilibrium Feb 22 '13 at 19:55
  • 1
    SkyDrive.com does this... – Nate Feb 22 '13 at 20:22

2 Answers2

5

You can use Interop to save the uploaded Powerpoint presentation as a series of graphics (e.g. PNG). Within Powerpoint, that would be File / Save As / *.png. You can accomplish the same programatically. Running interop code from ASP.Net is not a good idea. You can run a windows service that watches for uploaded ppt files and converts them to a corresponding series of images.

This would not preserve transitions and animations, but would otherwise work fine.

You can then use a slideshow gallery to display the various images (e.g. using Flash or JavaScript... there are many solutions available on the web).

Alternatively if you can ensure that the end user has at least the free Powerpoint viewer installed, you can return the ppt file to them with the appropriate mime type set, and the viewer will display it.

Eric J.
  • 147,927
  • 63
  • 340
  • 553
  • Can you be more specific on how can I accomplish this programmatically throw C#. Can you help me on what I should do after I have the path of the ppt file on a string? What I should do Next? – Equilibrium Feb 22 '13 at 20:27
  • It just so happens that there's a StackOverflow answer with the exact code that you need to open the PPT and save as a series of graphics: http://stackoverflow.com/a/1039457/141172 Give that a try. If you run into questions on how to do that, just open up a new question here. – Eric J. Feb 22 '13 at 21:41
1

Change the Powerpoint presentation into series of graphic using interop assembly as Eric said To make slideshow gallery you can follow below link which illustrated it very well with coding. You have to use javascript to accomplish it.

Visit http://www.c-sharpcorner.com/uploadfile/anjudidi/making-an-image-slideshow-in-Asp-Net/

The below link also show how to create slide show but it is taking graphics from database. http://www.aspdotnet-suresh.com/2011/12/jquery-lightbox-image-slideshow-gallary.html