How to use PHP & PowerPoint - Export/Convert PPT To JPG Format
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
- PHP & Create PowerPoint and Export/Convert PPT To JPG Format
Example
php_ppt_to_jpg.php
- <html>
- <head>
- <title>ShotDev.Com Tutorial</title>
- </head>
- <body>
- <?
- $ppApp = new COM("PowerPoint.Application");
- $ppApp->Visible = True;
- $strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); // C:/AppServ/www/myphp
- $ppName = "MySlides.ppt";
- $FileName = "MyPP";
- //*** Open Document ***//
- $ppApp->Presentations->Open(realpath($ppName));
- //*** Save Document ***//
- $ppApp->ActivePresentation->SaveAs($strPath."/".$FileName,17); //'*** 18=PNG, 19=BMP **'
- //$ppApp->ActivePresentation->SaveAs(realpath($FileName),17);
- $ppApp->Quit;
- $ppApp = null;
- ?>
- PowerPoint Created to Folder <b><?=$FileName?></b>
- </body>
- </html>
Create a php file and save to path root-path/myphp/
Screenshot
Subscribe to:
Post Comments
(
Atom
)
Thanks <3
ReplyDeleteVery 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
ReplyDeleteI'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
ReplyDeleteCan someone help on this ?