Solved

Create PowerPoint Presentation from PHP script?

Posted on 2006-12-02
5
2,862 Views
Last Modified: 2008-01-09
Is there an API for MS PowerPoint that would allow me to create a PP presentation from PHP code?
0
Comment
Question by:tradeline
5 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
ID: 18059248
Hi,
Unfortunatley there is no code available to do this directly, microsoft makes this difficult - especially if you are operating on a non-windows operating system.  You may be able to shell out to a program that handles this for you with the appropriate dll calls (.NET projects would be particularly good for this)
For more information please see:
http:Q_21360046.html "Powerpoint and PHP integration"
0
 

Author Comment

by:tradeline
ID: 18060340
That's the terrible news I was expecting :(.  I'm running PHP on a Linux server.  I'd need to setup another script, running on a windows server, connect remotely to that script, have the script use COM to build the PowerPoint file and then let the user save it on their desktop?  Is this correct?

The only other way is to scrap the code and re-write it in .NET, or at least host the app on a windows box.

Thanks.
Scott.
0
 
LVL 8

Expert Comment

by:jk2001
ID: 18066128
You can use Copy-and-Paste to do the import.  Format the text as an <OL> or an <UL> or even using the H1 to H6 tags.  Copy the text to export, and then paste it into PPT's outline view.  (The outline tab on the left side.) PPT will try to parse your outline, translating the indentations into different heading levels, and styling them up.

If you really need to automate it, you can use some COM automation to load up your web page, and then copy and paste into PPT.

(If you're perfectionistic, I suppose you can learn PPTs xml format and get PHP to produce that as output.  Can't help you there.  http://msdn2.microsoft.com/en-us/library/ms406049.aspx  )
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now