Levi wrote:
How can I use php and mysql to create a downloadable .ppt file from
the php-made output?
I don't think you're going to be able to do it in pure PHP; at some
point you'll probably have to exec out to something external. Also,
depending on how powerful a server you have, you may want to spawn the
Powerpoint generation off, give people a page where they watch a
countdown to give the system time to hammer away, and then refresh them
onto the URL where the finished Powerpoint is output from a file or a
database.
A few (of many) approaches:
a. On a Windows server, use PHP's COM functions (Windows-only) to make
direct calls to Powerpoint (see the manual). I'd look into either
building the whole presentation using PHP calls or passing arguments
from PHP to a VBA macro.
b. If all you plan to do is change some text and stuff in an otherwise
standardized presentation, maybe build a mockup of your presentation by
hand, save it to Office XML, have your PHP simply insert the custom
parts into the XML, and once again use the COM API in PHP to get
Powerpoint to read in the XML and convert it to a PPT.
c. If you're not running Windows servers, use OpenOffice to do the same
general things using its C or Java APIs from PHP.
d. If you have Windows servers but you use Unix/Linux for web stuff,
then run a SOAP server on the Windows/Powerpoint box, write a library
callable via SOAP that takes in parameters and builds a PPT, using any
language you want, and have it hand the PPT back to the Unix box in the
return results.
Believe me, none of this is outlandish. Things like this are done all
the time very successfully.
--
Steve Koppelman
http://www.hatless.com/