How to convert ppt slide to jpeg images in php
I was able to accomplish this by first converting the powerpoint file to pdf. This required me installing libre office on my server. Then converting the pdf to images is easily done using image magic. Here is some of my code. It uses https://github.com/ncjoes/office-converter (for the ppt to pdf conversion) and https://github.com/spatie/pdf-to-image (for the pdf to image conversion)
//now convert file to pdf
$converter = new OfficeConverter($newFile);
$result = $converter->convertTo('output.pdf');
$pdfFile = BASE_PATH.'/output.pdf';
//now convert pdf file to images
chdir(BASE_PATH);
//get total number of pages in pdf file
$pdf = new \Spatie\PdfToImage\Pdf($pdfFile);
$pdf->setCompressionQuality(80);
$pages = $pdf->getNumberOfPages();
for($i=1;$i<=$pages;$i++){
$pdf->setPage($i)->saveImage(BASE_PATH."/image$i.jpg");
}
http://code.google.com/p/jodconverter/ seems to have all the building blocks in place, there is even a sample webapp.
We used the old version at http://sourceforge.net/projects/jodconverter/ successfully some time ago, but thI really can't remember the details.