Posted By

cschlens on 05/07/10


Tagged

file powerpoint conversion


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

eval


Convert PPT to jpeg


 / Published in: PHP
 

  1. $powerpnt = new COM("powerpoint.application") or die("Unable to instantiate Powerpoint");
  2.  
  3. $presentation = $powerpnt->Presentations->Open(realpath($file), false, false, false) or die("Unable to open presentation");
  4.  
  5. foreach($presentation->Slides as $slide)
  6.  
  7. {
  8.  
  9. $slideName = "Slide_" . $slide->SlideNumber;
  10.  
  11. $exportFolder = realpath($uploadsFolder);
  12.  
  13. $slide->Export($exportFolder."\\".$slideName.".jpg", "jpg", "600", "400");
  14.  
  15. }
  16.  
  17. $powerpnt->quit();

Report this snippet  

You need to login to post a comment.