Skip to content

Repository files navigation

PDF ➡️ Preview

Generate a preview image for a PDF file — useful for sneak peeks of academic publications on project websites or presentation slides.

Pick a layout (Unroll, Stack, or Cover), drop in a PDF (or paste a link), and download the result as a PNG.

Example

How it works

Everything runs client-side in the browser — your PDF never leaves your machine:

  • pdf.js renders each page to a canvas
  • The Canvas API adds the border + drop shadow and composites the pages into the chosen layout
  • The only server code is a small API route (app/api/fetch-pdf) that proxies PDF-by-URL fetches around CORS

Built with Next.js, Tailwind CSS, and shadcn/ui.

Development

npm install
npm run dev

Deploy

Deploys as-is on Vercel — import the repo and hit deploy, no configuration needed.

Legacy

The original Streamlit/PyMuPDF version lives in legacy/.


By David Chuan-En Lin. PDF URL support by Eliott Zemour.

About

Generate a preview image for your paper.

Resources

Stars

54 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages