473,466 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to make php-output into .ppt format (Powerpoint-file)

How can I use php and mysql to create a downloadable .ppt file from
the php-made output?
Jul 17 '05 #1
3 17314
I doubt there is any function library to make ppt files, however, you
could write it yourself just by using the string buffer :p You can make
the browser accept .ppt as a download easy enough though, just by using
MIME-types and the header() function, but as for making the file, thats
a lot harder...

Jul 17 '05 #2
sk
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/

Jul 17 '05 #3
le**@livsnyter.com (Levi) wrote in message
news:<ab**************************@posting.google. com>...

How can I use php and mysql to create a downloadable .ppt file from
the php-made output?


Get a specification of PowerPoint file format (if one exists in the
public domain, which is not a guarantee, since the format is proprietary
to Microsoft) and recreate PowerPoint's file generation logic (which
will probably take you about 300 years, if you are working by yourself).

Cheers,
NC
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chris Krasnichuk | last post by:
Hello every one, Does anyone know how to make php work on your computer? please reply I need help Chris
20
by: Chris Krasnichuk | last post by:
hello, Does anyone know how I make php work on "my" computer? I made a mistake in my last post so I fixed it here. Chris
2
by: Frank de Bot | last post by:
hi, I've been recently testing a little few things with php (mainly speed). On thing I've noticed is that php is incredible SLOW to start up. Compared a perl script and php script aside of each...
6
by: Chapman Flack | last post by:
Ok, I've registered all the right headers to send, with header( 'Content-Type: .../...') etc. The next thing to do is exec a program that will be producing the actual content. The content MUST...
6
by: Kasper Lindvig | last post by:
I have recently installed php, mysql and apache on xp. Apache worked fine right from the start - so did mysql also. php on the other hand does not work at all. doing the phpinfo thing or just an...
2
by: RC | last post by:
By default PHP always supports MySQL. But all our database servers are PostgreSQL or Informix. Order for me get PHP supports other than MySQL. I need download PHP source codes and compiled it...
5
by: webandwe | last post by:
Hi I just need some code tips or ideas. I need to build a part of DB which has details of certain food providers at shelters. Here is what I need to build extra Once you click a link on...
3
by: johnny | last post by:
I have a remote script on a local network and I need to make Web App in PHP, call this remote script on a different machine. How do I do this? Many Thanks.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.