Convert PPT to jpeg


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.