I'm uploading some files (pdf, doc, docx, ppt, pptx) etc.
For previewing purpose, I want to grab a thumbnail screenshot of the content of the first page of these files.
How can I achieve this using PHP (or JavaScript)?
I'm uploading some files (pdf, doc, docx, ppt, pptx) etc.
For previewing purpose, I want to grab a thumbnail screenshot of the content of the first page of these files.
How can I achieve this using PHP (or JavaScript)?
For Excel, Word & Presentation you can use https://github.com/PHPOffice
For PDF you can use Imagick. Use [0] to make a screenshot of the fist page. https://medium.com/@freekmurze/convert-a-pdf-to-an-image-using-php-dfa8e2a921bd