on-internet
← Community

How to Generate PDF Thumbnails for Frontend Display in a Next.js + Sanity Application?

Stack Overflow ·

I am building an application using Next.js and Sanity, where users can upload PDFs via Sanity. On the frontend, I want to display these PDFs as thumbnails (just the front page of the PDF is enough). Users should be able to click on the thumbnail to either view the full PDF in a viewer or download it. I’ve successfully set up the Sanity backend for uploading and retrieving PDFs. However, I’m struggling to find a library or approach that can generate thumbnails from PDFs to display them on the frontend. Requirements: Generate a thumbnail (first page) of the PDF. Display the thumbnail on the fron

Comments

Sign in or sign up to comment and upvote.

No comments yet.