Annotouch is a browser app for marking up local PDFs without clicking or pressing down on your trackpad. Open a PDF, hold Space, move the pointer over a page, and release Space to finish the stroke. Hold E and move over an existing stroke to erase it.
I created this app because while taking notes in class I realized not having a tablet to take notes on put me at a disadvantage when trying to learn. Annotating a pdf for in-class work using traditional trackpad movements felt limiting. Osu inspired this solution by using a keystroke to 'click' then moving the cursor to register a move complete.
- Loads local PDF in the browser.
- Creates page shells and lazily renders pages as they near the viewport.
- Allows annotations on up to the first 200 pages.
- Stores strokes by page.
- Erases whole strokes by holding
eand moving over them. - Supports undo, redo, and PDF export.
- Keeps pages beyond the first 200 unchanged and intact when exporting.
PDFs with more than 200 pages still export with their full original page count. Only pages 1-200 are rendered and annotatable currently, but later pages are preserved unchanged in the exported PDF.
npm install
npm run devBuild for production:
npm run build
npm run previewRun browser QA:
npx playwright install chromium
npm run test:e2eThe Playwright source files are part of the project and should be committed:
playwright.config.js configures the browser test runner, and tests/ contains
the generated-fixture regression tests. Only Playwright's generated outputs,
playwright-report/ and test-results/, are git-ignored.
src/main.jswires the UI, PDF loading, lazy rendering, and export flow.src/pdfViewer.jshandles PDF.js document loading and page rendering.src/annotator.jshandlesSpacedrawing andeerasing with pointer movement.src/strokeStore.jsstores and redraws page-specific strokes.src/exporter.jswrites annotations back into the exported PDF.playwright.config.jsstarts Vite and configures Chromium browser QA.tests/e2e/annotouch.spec.jsgenerates PDF fixtures and covers upload, lazy rendering, drawing, color, undo, capped annotation, and export regressions.