<?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;
} 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 { $isprComobj->GenerateFlash($swffile_folder, $swf_file, 0, ""); } catch (Exception $e) { $message = "<result><status>9.2 Error</status><message>" . $e->getMessage() . "</message></result>"; logit("ispring.php", $message); return $e; } $isprComobj = null; logit("ispring.php", "7. Finished converting "); $thumbname = str_replace(".", "_", $fileName); logit("ispring.php", "8. After converting the Thumbname" . $thumbname); //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. function rm_recursive($filepath) { if (is_dir($filepath) && !is_link($filepath)) {