Hi,
Does anyone know of a way to generate a JPEG of the 1st slide in a PPTX, 1st page of a PDF, 5 seconds into a MP4 file as they are uploaded / picked as a symlink in MODx?
I would be very surprised if there's a way to do that in code. I couldn't find a PDF solution, and I think that's the most likely to exist.
There are tools (online and local) that will do the extraction and conversion for at least some of those formats, but you'd have to do the conversion manually ahead of time and save the results.
The fact that the tools exist proves that it's technically possible, so maybe there are libraries out there that I didn't find.
[Update] It looks like there's a solution here for PDF files:
http://stackoverflow.com/questions/467793/how-do-i-convert-a-pdf-document-to-a-preview-image-in-php. (This trick was including 'preview' as a search term.)
This looks like it will do it for PPTX files, and it appears to have an API:
http://www.aspose.com/products/slides/java
Finally, MP4 info:
http://stackoverflow.com/questions/25096630/mp4-video-thumbnail-create-using-php-gd
[ed. note: BobRay last edited this post 10 years, 2 months ago.]
Thanks Bob. Will have a look.