Veil
- title
- Veil
- type
- toolbox
- summary
- Browser PDF reader that darkens text via PDF.js operator lists while leaving images intact
- tags
- pdf, reader, accessibility
- language
- TypeScript
- license
- MIT
- created
- 2026-04-07
- updated
- 2026-04-07
A browser-based PDF reader that applies dark mode without destroying images. Most dark-mode PDF tools just invert the entire page, which turns photos into negatives and makes charts unreadable. Veil uses PDF.js operator lists to distinguish text from images, inverts only the text, and leaves visual content alone. Already-dark pages are skipped entirely.
Everything runs client-side โ rendering, OCR, and export all happen in the browser. Files never leave your machine. No AI, no signup, works offline after loading.
How it works
Veil hooks into PDF.js at the operator list level to identify which parts of a page are images and which are text or vector graphics. Text gets inverted for dark-mode readability; images stay in their original colors. This is deterministic โ no heuristics or ML guessing which regions are photos.
For scanned documents, Veil runs OCR in the browser to extract text trapped inside images: chart labels, axis numbers, figure captions. The extracted text becomes selectable and searchable.
The dark PDF export bakes the inverted rendering into a downloadable PDF. Internal navigation links, external references (DOIs, bibliographic links), and bookmarks survive the export.
Usage
Open https://veil.simoneamico.com/reader, drag a PDF onto the page, and it renders in dark mode immediately. Zoom controls and page navigation work as expected. Hit export to download a dark-mode PDF you can read on any device.
Limitations
- Web-only โ no desktop app or CLI
- Large PDFs may be slow since all processing is client-side
- OCR quality depends on scan resolution
By Simone Amico. MIT license. Repo: https://github.com/simoneamico-ux-dev/veil