<?php set_time_limit(0); $PPT_FILE = "/1.ppt"; $SWF_FOLDER = ""; $SWF_FILE = "quicktour.swf"; $fs = new COM("iSpring.PresentationConverter"); echo "Opening presentation\n"; $fs->OpenPresentation($PPT_FILE); echo "Generating flash...\n"; $fs->GenerateFlash($SWF_FOLDER, $SWF_FILE, 0, "Standard"); echo "Done\n"; // Warning! When you don't need iSpring object it is necessary to set it to null // otherwise error will occur when PHP script finishes. $fs = null;
logit("ispring.php", "3.1 This is the swf file folder path " . $swf_file); try { $isprComobj = new COM("iSpring.PresentationConverter"); } catch (Exception $e) { $message = "<result><status>9.1 Error</status><message>" . $e->getMessage() . "</message></result>"; logit("ispring.php", $message); return $e; } logit("ispring.php", "4. com object created"); //echo "Opening presentation\n"; $isprComobj->Settings->Playback->Player->CorePlugins->AddBuiltInPlugin(1); $isprComobj->Settings->Navigation->KeyboardEnabled = false; $isprComobj->Settings->Navigation->AdvanceOnMouseClick = false; logit("ispring.php", "5. opening presentation"); try { $isprComobj->OpenPresentation(realpath($file_path)); } catch (Exception $e) { $message = "<result><status>9.1 Error</status><message>" . $e->getMessage() . "</message></result>"; logit("ispring.php", $message); return $e; } logit("ispring.php", "6. Saving Thumbnails"); try { $isprComobj->Presentation->Slides->SaveThumbnails($thum_folder . "/" . $file_name . '_files', "thumbnail_", 2, 140, 140, 90); } catch (Exception $e) { $message = "<result><status>9.3 Error</status><message>" . $e->getMessage() . "</message></result>"; logit("ispring.php", $message); return $e; } logit("ispring.php", "6. Generating flash"); try {