473,748 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
+ 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 17343
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.go ogle.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
3515
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
11670
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
5405
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 other. In case of my system it took perl roughly 6ms , but php over 30ms . php only got activated things like MySQL, ming en pdflib. Ok, the runnings time are pretty short, but I try to make things as efficient as possible. Mainly because it is...
6
1901
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 begin immediately after the headers (that is, after the single empty line that separates the headers from the body). PHP won't seem to send the headers unless I tell it to print something. I tried printing an empty string print(''); - still...
6
1591
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 echo only returns a blank page. Something tells me that configuring php is quite a pain in the a**. I've done everything from editing the httpd file and the php.ini file, to copying it and the php5ts.dll file to the systems folder. I've even tried...
2
1468
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 "--with-pgsql=/var/lib/pgsql" option. Then reinstall it. I think there is must a way I can edit the php.ini file, make php support other database beside MySQL.
5
1398
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 one of the 500 shelters, it must open like a auto generate php page with each day of the week, but here is where it gets difficult for me. Now the owner of the DB must be able to insert/delete/edit text on each day of the week.
3
3256
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
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9326
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3315
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 we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.