Learning & Integrating web technology and code help directory

How to use PHP & PowerPoint - Export/Convert PPT To JPG Format

3 comments
How to use PHP & PowerPoint - Export/Convert PPT To JPG Format The Learn / Tutorial / Sctipts php programming how to using  PHP Create PowerPoint and Export/Convert PPT To JPG Format
ShotDev Focus:
- PHP  & Create PowerPoint and Export/Convert PPT To JPG Format
Example
php_ppt_to_jpg.php

  1. <html>  
  2. <head>  
  3. <title>ShotDev.Com Tutorial</title>  
  4. </head>  
  5. <body>  
  6. <?  
  7. $ppApp = new COM("PowerPoint.Application");  
  8. $ppApp->Visible = True;  
  9.   
  10. $strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); // C:/AppServ/www/myphp  
  11.   
  12. $ppName = "MySlides.ppt";  
  13. $FileName = "MyPP";  
  14.   
  15. //*** Open Document ***//  
  16. $ppApp->Presentations->Open(realpath($ppName));  
  17.   
  18. //*** Save Document ***//  
  19. $ppApp->ActivePresentation->SaveAs($strPath."/".$FileName,17);  //'*** 18=PNG, 19=BMP **'  
  20. //$ppApp->ActivePresentation->SaveAs(realpath($FileName),17);  
  21.   
  22. $ppApp->Quit;  
  23. $ppApp = null;  
  24. ?>  
  25. PowerPoint Created to Folder <b><?=$FileName?></b>  
  26. </body>  
  27. </html>  
Create a php file and save to path root-path/myphp/
Screenshot
PHP & PowerPoint - Export/Convert PPT To JPG Format
.

3 comments :

  1. Very significant Information for us, I have think the representation of this Information is actually superb one. This is my first visit to your site. Convert Powerpoint to JPG

    ReplyDelete
  2. I'm facing this error - Fatal error: Uncaught com_exception: Failed to create COM object `PowerPoint.Application': Call was rejected by callee. in C:\wamp64\www\ppttoimg\php_ppt_to_jpg.php on line 7

    Can someone help on this ?

    ReplyDelete