This can be done with PHP using the 3d batch library (Aspose.Slides). It will work on both .ppt and .pptx, and it is lightning fast.
Here is the corresponding code snippet in PHP:
$runtime->RegisterAssemblyFromFile("libraries/_bin/aspose/Aspose.Slides.dll", "Aspose.Slides"); $runtime->RegisterAssemblyFromFullQualifiedName("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing"); $sourcefile = "D:\\MYPRESENTATION.ppt"; $presentation = $runtime->TypeFromName("Aspose.Slides.Presentation")->Instantiate($sourcefile); $format = $runtime->TypeFromName("System.Drawing.Imaging.ImageFormat")->Png; $x = 0; $slides = $presentation->Slides->AsIterator(); foreach ($slides as $slide) { $bitmap = $slide->GetThumbnail(1, 1); $destinationfile ="d:\\output\\slide_{$x++}.png"; $bitmap->Save($destinationfile, $format); } $presentation->Dispose();
It does not use Office Interop (which is NOT recommended for server-side automation) and quickly performs highlighting.
You can control the output format, image size and quality. You actually get a .Net Bitmap object so you can do whatever you want with it.
The original post is here:
http://www.drupalonwindows.com/en/blog/powerpoint-presentation-images-php-drupal-example
source share