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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Levi

    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?
  • Dave Bell

    #2
    Re: How to make php-output into .ppt format (Powerpoint-file)

    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...

    Comment

    • sk

      #3
      Re: How to make php-output into .ppt format (Powerpoint-file)

      Levi wrote:[color=blue]
      > How can I use php and mysql to create a downloadable .ppt file from
      > the php-made output?[/color]

      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
      Wij geloven in onafhankelijk denken en het aangaan van oprechte connecties. Wij laten jouw business betekenisvol groeien. Hoe? Dat lees je op onze site.


      Comment

      • Nikolai Chuvakhin

        #4
        Re: How to make php-output into .ppt format (Powerpoint-file)

        levi@livsnyter. com (Levi) wrote in message
        news:<aba81efb. 0310230706.7773 9c79@posting.go ogle.com>...[color=blue]
        >
        > How can I use php and mysql to create a downloadable .ppt file from
        > the php-made output?[/color]

        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

        Comment

        Working...