Skip to content
| Marketplace
Sign in
Visual Studio Code>Education>PDF Q&A ReaderNew to Visual Studio Code? Get it now.
PDF Q&A Reader

PDF Q&A Reader

xinyu-daidai

|
2 installs
| (0) | Free
Read a PDF in VS Code, capture a passage, and ask Claude Code about it. Answers are logged next to the PDF with page and theorem references.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PDF Q&A Reader

Read a PDF inside VS Code, select the passage you did not follow, and ask Claude Code about it. The answer is grounded in an image of that passage, so formulas are read correctly rather than from garbled extracted text, and every question and answer is saved to a log next to the PDF with the printed page, the section and the theorem it belongs to. At the end of a reading session one command turns the log into reading notes with citations.

Built for reading dense material: textbooks, lecture notes, papers, proofs.

Selecting the last line of a proof in the PDF Q&A Reader and capturing it

The entry that /pdf-ask wrote to the log for that passage, rendered as Markdown:

A Q&A log entry with the passage image, the question, a step-by-step explanation, sources and status

What you need

  • Claude Code in VS Code. This extension captures the passage; Claude Code answers and writes the notes.
  • Python 3 with PyMuPDF (pip install pymupdf), used to locate the passage and render the crop images.

Setup

  1. Install this extension.
  2. Run PDF Q&A: Install Claude Code Skills from the Command Palette. It copies the /pdf-ask and /pdf-summary skills into ~/.claude/skills/. The extension also offers this the first time you capture a passage. Start a new Claude Code conversation afterwards so it picks them up.

Reading loop

  1. Right-click a PDF in the Explorer, choose Open in PDF Q&A Reader (or use Reopen Editor With... on an open PDF).
  2. Select a passage and press Alt+Q (Cmd+Alt+Q on macOS), or use the Ask about selection button or the right-click menu. For an equation or a figure, where selecting text is awkward, press Alt+R and drag a box around it. Page captures the whole current page.
  3. Focus moves to the Claude Code input. Type /pdf-ask and your question.
  4. Claude reads a crop image of the passage, resolves the results it cites (for example the theorem the proof appeals to, ten pages back), answers, and appends the entry to notes/<pdf name>/qa-log.md beside the PDF. Follow-up questions are logged under the same entry.
  5. When you are done, run /pdf-summary, or narrow it with /pdf-summary chapter 1 or /pdf-summary today. It writes notes/<pdf name>/summary.md, ordered by the source's own sections, with page and theorem citations, open questions and a reference list. A ## My notes section you add there is preserved when the summary is regenerated.

You can also paste a quote instead of capturing: /pdf-ask p. 32 "Since the increments of our martingale are bounded..." why does that suffice? The passage is then located in the PDF automatically.

What the answers look like

The skills are written for careful reading rather than a quick paraphrase:

  • Page references are the printed page numbers of the document, with the PDF page in parentheses, detected from the running headers when the PDF has no page labels.
  • Each answer separates what the source states, with its page, from reasoning that was added, and marks added steps that were not checked.
  • Apparent typos, broken references and gaps in the source are reported, not silently repaired.
  • Cross-references are resolved and cited: "Lemma 1.5.4", "(1.5.8)", "Section 1.5".

Files it writes

Path What
~/.pdfqa/selection.json The latest capture: PDF path, page, position on the page, selected text
~/.pdfqa/captures.jsonl Every capture, one per line
<pdf dir>/notes/<pdf name>/qa-log.md The Q&A log
<pdf dir>/notes/<pdf name>/crops/ Passage images shown in the log
<pdf dir>/notes/<pdf name>/source.md Citation and BibTeX, written on the first question
<pdf dir>/notes/<pdf name>/summary.md Output of /pdf-summary

Nothing is sent anywhere by the extension: it makes no network requests and collects no telemetry. The PDF and the captured passage reach Claude only through your own Claude Code session when you ask a question.

Settings

  • pdfQa.notesDirectory (default ${pdfDir}/notes): where the per-PDF notes folders go. ${pdfDir} is the PDF's folder, ${workspaceFolder} the first workspace folder.
  • pdfQa.focusClaudeAfterCapture (default on): move focus to the Claude Code input after a capture.

To make this the default viewer for PDFs, add to your settings:

"workbench.editorAssociations": { "*.pdf": "pdfQa.viewer" }

Viewer

Ctrl+F searches (Enter and Shift+Enter step through matches, Esc clears), the page box plus Enter jumps to a page, and zoom has fit-width, fit-page and percentage presets. Internal links work, so a reference in a hyperref PDF takes you to the theorem. The page and zoom are remembered per file.

Credits

Rendering by PDF.js (Apache 2.0), bundled with the extension; see THIRD-PARTY-NOTICES.md. Extension code under the MIT license.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft