Uploading a preview image of a PDF along with the PDF

The user uploads a PDF file, but I also want to grab (and upload) a preview image of the first page of the PDF. What's the best way of accomplishing this? I've seen a couple pretty hacky decade-old ways of doing this, but I'd love some pointers or recommendations of where to look
3 Replies
markr
markr•4mo ago
I would probably go with something like pdf.js still, working with pdfs in JS kinda sucks generally though. this might be helpful: https://github.com/scandel/pdfThumbnails?tab=readme-ov-file
#snuglife
#snuglifeOP•4mo ago
Interesting, thanks! I am going with pdf.js and it went well but this looks worth a look too, appreciate it 🙂
markr
markr•4mo ago
That solution is using pdfjs too. It seems to be pretty agreed upon haha 🙂 Best of luck!
Want results from more Discord servers?
Add your server