Skip to content
adirelPublic

Repository files navigation

Velo PDF logo

Velo PDF

Instant viewing for massive PDFs. Local, offline, zero lag.

A blazing-fast, installable PDF viewer (PWA) built for huge documents. A 10,000-page PDF is on screen in about a second, you can jump to any page in under 0.1 s, and scrolling never stutters, even at 100,000 pages. Full-text search, text selection and dark mode included. Files never leave your device.

Live demo

Build Website PWA Offline Privacy PRs welcome License: MIT Release

TypeScript Vite PDF.js Workbox Netlify Chrome Edge Windows

Last commit Top language Repo size Stars

Open the app · Benchmarks · Report a bug · Request a feature

⭐ If Velo PDF is useful to you, a star helps others find it!


Velo PDF demo: open a 10,000-page PDF, jump to page 9,000, zoom to 800%, search, dark mode

📸 Screenshots

Home Viewer Menu & recent files
Velo PDF home screen Viewing page 4,321 of a 10,000-page PDF Sidebar with recent files

✨ Features

  • ⚡ Zero-lag scrolling through 100,000+ pages: only what's on screen is rendered.
  • 🎯 Jump anywhere instantly: page 90,000 of 100,000 is sharp in under 0.1 s.
  • 🔍 Instant zoom with the mouse wheel or pinch, anchored at the cursor; razor-sharp up to 800%.
  • 🔎 Full-text search (Ctrl F) with streamed results: the first hit appears in milliseconds.
  • ✍️ Text selection tool to select and copy text.
  • 🖊️ Draw and write on pages: freehand pen with colors and widths, and text with a choice of font, size and color (any language, including Hebrew).
  • ✒️ Sign PDFs: draw your signature once, then stamp it anywhere with one click.
  • 🔄 Rotate pages one at a time.
  • 💾 Save as a copy: edits stay pending (with undo) until you save a new PDF; the original file is never touched. Discard returns to the original.
  • 🎨 Three themes (Neon, Ember, Daylight), remembered between visits.
  • 🌙 Dark reading mode for night reading.
  • ✋ Drag to pan with the left mouse button, with a smooth glide on release.
  • 🕘 Recent files with "continue reading": reopens each file at the page you left off.
  • 📲 Installable PWA that works fully offline.
  • 🪟 Registers as a PDF viewer on Windows: Open with → Velo PDF.
  • 🔒 Private by design: nothing is uploaded; history stores only a reference to each file.
  • 🌌 Futuristic neon UI that works on desktop and mobile.

🚀 Live demo

👉 https://jolly-horse-319b11.netlify.app/

Every push to main is deployed automatically by Netlify.

📲 Install as an app

  1. Open the live demo in Edge or Chrome.
  2. Click Install app in the top bar (or the install icon in the address bar).
  3. Velo PDF now has its own window, Start-menu entry and works offline.

🪟 Open PDFs from Windows

After installing:

  1. Right-click any PDF → Open with → Velo PDF. The first time, the browser asks to allow it.
  2. To make it the default: Settings → Apps → Default apps → .pdf → Velo PDF.

File handling comes from file_handlers in the manifest (vite.config.ts) and window.launchQueue in src/main.ts.

⌨️ Controls

Action Input
Zoom in / out Mouse wheel, touchpad pinch, Ctrl + / Ctrl -
Fit page Ctrl 0
Pan (hand tool) Drag with the left mouse button · H
Select text T, then drag over text
Search Ctrl F, then Enter / Shift Enter (or F3) for next / previous
Dark pages D
Draw P, then drag on a page
Add text A, click on a page, type, Enter to place (Shift Enter for a new line)
Sign S, draw your signature once, then click where it goes
Rotate current page R (clockwise) · Shift R (counter-clockwise)
Undo last edit Ctrl Z
Save a copy with edits Ctrl S
Back to reading Esc or H
Scroll Scrollbars, PageUp / PageDown, arrows, Home / End
Open a file Ctrl O, the menu, or drop a PDF anywhere
Go to page Type a number in the page box and press Enter

🛠️ Development

git clone https://github.com/adirel/velo-pdf.git
cd velo-pdf
npm install
npm run dev             # http://localhost:5173
npm run build           # production build in dist/ (with service worker)
npm run build:preview   # build + serve on http://localhost:4173 (installable)
npm run icons           # regenerate the logo and app icons
npm run demo-pdf -- 10000                          # generate a 10,000-page test PDF in test-files/
npm run benchmark -- velo-demo-10000.pdf 3         # benchmark it (dev server must be running)

The dev server doesn't run the service worker; use build:preview (or the deployed site) to test installing.

Deploy on Netlify

Setting Value
Build command npm run build
Publish directory dist
Node version 22

📊 Benchmarks

Measured with scripts/benchmark.mjs in headless Chrome (1440×900) on an Intel Core Ultra 7 155H laptop, median of 5 runs (10k) and 3 runs (100k). Test files come from scripts/make-demo-pdf.mjs, so you can reproduce everything.

10,000 pages · 33.5 MB 100,000 pages · 335 MB
Open → first page sharp 1.0 s 5.3 s
Jump to page at 90% → sharp 85 ms 87 ms
Main-thread long tasks during a fast fling (120 × 600 px) 0 0
Zoom response 22 ms 14 ms
Search: first hit 36 ms 15 ms
Search: all pages 10.6 s (46,658 hits) not measured (see limitations)

Known limitations (help wanted!):

  • Opening time grows with file size: during open, pdf.js currently reads the whole file for these test PDFs. Viewing, jumping and zooming afterwards don't depend on size. Tracked in the issues.
  • Searching every page of a 100,000-page document takes minutes and a lot of memory. Results stream in, so the first hits still appear immediately.

🧠 How it stays fast

Technique Where
Large local files are read through a byte-range transport (Blob.slice) instead of one big arrayBuffer() openPdf.ts
Virtualized DOM: only the visible pages ±1 exist PdfViewer.ts #update
Page sizes are guessed from page 1, then fixed in idle batches with scroll anchoring PageLayout.ts, #loadAllSizes
Priority render queue that cancels off-screen work on every scroll RenderQueue.ts
pdf.js render slices yield to the event loop, so input is never blocked for more than ~15ms yieldToEventLoop
Quick low-res preview first, then a sharp render once scrolling/zooming settles #wantedRenders
Zoom is instant: existing canvases are stretched by CSS, then re-rendered setScale
At high zoom, a sharp "detail" canvas covers only the visible region #detailRequest
LRU cache of rendered canvases with a byte budget (384MB), and evicted pages are cleaned up CanvasCache.ts
Documents taller than the browser's max element height (~33M px) scroll inside a re-basing 15M px window #setDocTop
Text layers are built once at scale 1 and scaled with a CSS variable, so zoom never rebuilds them PageTextLayer.ts

🗺️ Roadmap

  • Thumbnails sidebar and outline / bookmarks
  • Clickable links, two-page layout, print
  • Move / erase individual drawings and text
  • Faster open for huge non-linearized files
  • Rendering inside a Worker with OffscreenCanvas
  • Signatures, drawing, text, page rotation and save-as-copy; themes
  • Landing pages (EN/HE), Microsoft Store-ready manifest
  • Full-text search, text selection, dark mode
  • 100,000-page documents at any zoom
  • Recent files with resume position
  • Installable PWA with Windows file handling

🤝 Contributing

Issues and pull requests are welcome! Start with CONTRIBUTING.md and the good first issues.

📄 License

MIT © adirel. Built on pdf.js (Apache-2.0).


Made with ⚡ and ☕ · jolly-horse-319b11.netlify.app

Keywords: pdf viewer, pdf reader, pwa, progressive web app, pdf.js, large pdf, fast pdf viewer, offline pdf viewer, typescript, vite, netlify, windows pdf viewer, file handling api