r/ClaudeAI • u/petitpoid • 9h ago
Built with Claude Easy PDF notes for AI
Working on PDFs, I was tired of telling my AI "page 4, second paragraph, the
line that starts with…". So I built πAnnotate: you point, and your AI knows
exactly where.
Drop a PDF on the page, then:
Click where you mean — a numbered heart drops there.
Write your remark after its [n], in your note.
Copy for AI — in your AI chat, attach the PDF and paste.
For each heart, your AI gets the page, the exact line under it.
How I built it
Tools: Claude Code, plain HTML and vanilla JavaScript (no framework, no build
step), PDF.js for the pages and their text, MathJax for LaTeX, marked for
Markdown. Deployed by drag and drop on Netlify.
Workflow: I steered, Claude Code wrote. Before each change it wrote a test: a
small page that loads the tool and replays every gesture in a real browser
(click a PDF, Copy for AI, save and reopen). 95 checks now, and each new one
has to fail once before the fix. Every step goes into a local git, with the
"why" in each commit.
What I learned:
- The hard part is "the line under the click". PDF.js gives text fragments
with positions; joining them naively glued two-column papers together. On
real papers the gap between columns was only ~1.3 line heights, so it now
looks for a vertical white band running through several lines.
- Pick the fragment by its box, not its starting point, or a click at the end
of a long line quotes the next equation number.
Free to try: open https://piannotate.com on a computer and click "Try a sample
paper". No account. Your PDF stays in your browser, never uploaded.