0

Is there any way to read and view a PowerPoint presentation within a Windows Store App? What I want to achieve is to open the .pptx file from the computer and display the slides inside the app. Basically, it would be like a PowerPoint viewer. What I figured out with extensive searching is I can use Aspose.Slides API to convert the slides to images and then display them to the user. But firstly, Aspose.Slides is not available for WinRT and secondly, it is not free. The OOXML is really complicated and I can't find an approach to achieve this via OOXML. What could be a work around to the problem? And can there be a way to manipulate the slides?

Gaurav Chouhan
  • 265
  • 2
  • 13
  • The only ways to do this would be to convert the slides to a different format, such as XAML, HTML or images. There are pro/cons to each model. In any case, you'd probably have to pay for the solution. You could write your own converter, but it is a long, hard task. – Todd Main Dec 27 '12 at 22:28
  • Can I get a reference or tutorial or any API in WinRT which is able to do this? I think the images method is the best but I don't know any API which can do that. Any suggestions? – Gaurav Chouhan Dec 28 '12 at 07:43

1 Answers1

2

I haven't seen a WinRT API for PowerPoint, but if you found one for .NET you could easily write a web service that would take a ppt or pptx and use the API to convert it to images or something else that you can display.

If you have some control over the presentations - you might also consider saving them as XPS which is WPF/XAML based format, but even then you would need to do some more work to process it to a XAML format compatible with WinRT/XAML and might still have some problems loading custom embedded fonts etc.

Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
  • Yeah! the web service option was always there. Can you tell me some API already present for .NET which could convert it to images or XPS if you know any? As I am just a student my experience with all this is limited so references and tutorials would be highly appreciated. And thanks again for your time here.. :) – Gaurav Chouhan Dec 28 '12 at 11:55
  • You could probably use VSTO as in this [sample](http://code.msdn.microsoft.com/vstudio/PowerPoint-2010-Working-d63a5ea7/sourcecode?fileId=25930&pathId=1993384010). Some people recommend using Aspose though for server applications [(1)](http://stackoverflow.com/questions/981547/powerpoint-launched-via-c-sharp-does-not-quit), [(2)](http://stackoverflow.com/questions/10537651/proper-disposal-of-com-interop-objects-in-c-sharp-particularly-ms-office-applica) – Filip Skakun Dec 28 '12 at 16:42
  • That will really help! Thanks a ton. I will try to go through it all and I think web service will be the only solution. Just one more thing, What will it take to represent XPS into XAML? If you could guide me to a reference article that would be more than helpful. :) – Gaurav Chouhan Dec 28 '12 at 17:15
  • I don't have one handy, but you can rename an XPS to zip and find some files inside. Some of them would have XAML content. Not sure how you would convert the XAML though since some of the XPS XAML elements (like Glyphs element) might require using DirectWrite at the very least. I would not recommend that approach unless images don't work for you, since you will need to get your hands really dirty in parsing XPS and rendering it with WinRT/XAML and/or Direct2D. – Filip Skakun Dec 28 '12 at 17:38
  • I got your point. I will stick to image conversion then. Thank You. :) – Gaurav Chouhan Dec 28 '12 at 17:46