Embed a Powerpoint Viewer on a web page (PHP)

I am creating a PHP application where the user uploads Powerpoint files. I want other users to view it online rather than download it. (Using third-party applications such as Google docs can be a little cumbersome for users) Is it possible to write PowerPoint viewer code in PHP?

+7
powerpoint viewer
source share
4 answers

You can automate the process of using Google documents with php.

Google provides a ppt viewer that you can embed in web pages using the following code

<iframe src="http://docs.google.com/gview?url=http://www.domainname.come/presentation.ppt&embedded=true" style="width:550px; height:450px;" frameborder="0"></iframe> 

Now I am assuming php is handling the loading of your users, so it would be easy to find the url for a particular ppt file. You can save this URL either in a variable or in a database, extract it when necessary, and put it in the code above.

Hope I could explain the logic I'm trying to apply, let me know if you need additional specifications.

+13
source share

I suspect it would be a lot easier to reduce powerpoint slides to .PNG files and build a simple PHP script for looping through images.

+2
source share

"Is it possible to write Powerpoint viewer code in PHP?"

Yes. Unfortunately, if you ask this question, you probably cannot do it yourself.

If you want to try anyway, here is a good place to start: http://msdn.microsoft.com/en-us/library/cc313106(office.12).aspx

Or you can look for a library that does this. They are probably there, just google.

EDIT: Found here: http://phppowerpoint.codeplex.com/

+1
source share

Do you want to rewrite Powerpoint in PHP? I'm going to say ... very difficult at best. There are, however, tools that make your life easier. In addition, Powerpoint has the option “Save as a web page”, so perhaps you could add that your loaders saved PowerPoint as a web page and load this output, which, as I could imagine, would be pretty easy for you afterwards web.

Alternatively, if you feel more ambitious, you can look at the Google APIs and possibly create a portal for uploading to Google documents for contributors and view Google documents for your visitors. Your PHP interface can use the capabilities of Google documents, but eliminate cumbersomeness (I’m kind of surprised that this is a real word).

+1
source share

All Articles