Upload a PDF, annotate it (draw, text, highlight, erase), and export to several formats. You can also download the original bytes with a different file extension (rename-only) for quick repackaging.
- Upload PDF: Client-side, no server required.
- Annotate:
- Draw with adjustable color and size
- Add text labels
- Rectangle highlighter with adjustable opacity
- Eraser for annotations
- Export:
- Edited PDF (current page overlay)
- PNG for current page
- ZIP containing PNGs of all pages
- Extracted plain text (.txt) for all pages
- Save original bytes using a different extension (e.g., .docx, .jpg, .zip)
- Mobile-first UI with sticky toolbars
- React + Vite
- pdfjs-dist (rendering & text extraction)
- pdf-lib (embedding annotations as an image overlay into PDF)
- FileSaver.js, JSZip
- Node.js 18+ and npm
npm installnpm run devOpen http://localhost:5173 in your browser.
npm run build
npm run preview- Click “Choose file” and select a PDF.
- Pick a tool: Draw, Text, Highlight, or Erase.
- Adjust color, size, and zoom scale as needed.
- Use “Clear Page” to remove current annotations on that page.
- Export options at the bottom bar:
- Edited PDF (current page overlay)
- Current Page PNG
- All Pages ZIP (PNGs)
- TXT (all pages)
- Save as specific extension (rename-only)
- The “Edited PDF” export embeds the annotations of the current page as an image overlay on that page only (MVP). Multi-page embedded overlays can be added later.
- “Save as extension” does not convert the PDF; it downloads the original bytes with a different extension name.
- Text extraction is basic and may not preserve layout.
- pdf.js uses dynamic code internally which may trigger warnings in some bundlers; this is expected for client-side rendering.
- Push this project to GitHub (repo:
barramee27/pdf). - In Vercel, import the repository.
- Settings:
- Framework Preset: Vite
- Build command:
vite build - Output directory:
dist
- Deploy. Once complete, open the URL and test with a sample PDF.
- No environment variables required.
vercel.jsonroutes all paths toindex.htmlfor SPA behavior.
- Per-page annotation layers persisted and embedded for the entire document
- Move/resize text annotations after placement
- Freeform highlighter path
- Undo/redo stack
- Drag-and-drop file support
MIT — see LICENSE for details.
- Mozilla pdf.js (
pdfjs-dist) - pdf-lib team
- Open-source community