-2

I have a question about uploading PDF file in PHP, how I can uploading PDF file to the database and first page of the PDF file set as a cover to the PDF file

James
  • 33
  • 7
  • 1
    First off I'd recommend storing the PDF file in the file system and the file name in the database. Makes no sense to have lots of data in the database you can't use for queries etc. Second are you displaying a download link on the website and you want a preview of the first page of the pdf as a thumbnail? – JimL Mar 28 '18 at 14:31
  • Welcome to SO. If you show the work you've done to try to accomplish this yourself and provide an [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example we can help you a lot more. For more understanding, see why is ["please help" not a question](https://meta.stackoverflow.com/questions/284236/why-is-can-someone-help-me-not-an-actual-question). – Aditya Mar 28 '18 at 14:33
  • YES bro, I want to set the first page of PDF as cover or thumbnail behind download link after uploading by PHP code, I want this think to library management system ... (to JimL) – James Mar 28 '18 at 14:38

1 Answers1

0

By using imagick / ghostscipt you can accomplish what you're asking for.

Sketch at: Convert PDF to JPEG with PHP and ImageMagick

Teson
  • 6,644
  • 8
  • 46
  • 69