Paper Viewer – Academic PDF Reader
Paper Viewer is an academic PDF viewer for reading and annotating research
papers in VS Code. Add highlights and sticky notes, follow citations to arXiv
or DOI links, and open the same annotated PDF in macOS Preview. Add a PDF
highlight and its note to a Codex or Claude Code chat draft in one click.
Install
Paper Viewer requires VS Code 1.123 or later.
Search for jeffryca.paper-viewer in the VS Code Extensions view.
From the checkout, build and install the extension with Node.js 20 or later.
npm ci
npm run package
code --install-extension paper-viewer-0.0.6.vsix --force
You can also select the built file with Extensions: Install from VSIX… in
VS Code. If VS Code was open during installation, save your edits and run
Developer: Reload Window.
Use it
Open a PDF with Reopen Editor With… → Paper Viewer if another editor
is selected.
- Use Command–P or Ctrl–P for VS Code Quick Open while reading.
- Click Highlight to toggle automatic highlighting when you select text.
With the mode off, select text and press H, Control–Command–H on Mac or
Ctrl–Alt–H on Windows and Linux. Add Shift to toggle the mode. Both
shortcuts are configurable in VS Code.
- Open the swatch beside the highlighter to choose from Preview's yellow,
green, blue, pink, and purple.
- Paper Viewer: Text Highlight Thickness controls the height of new
text highlights. It defaults to 80% of the selected text height.
- Click an existing highlight and use its remove button or press Delete.
Save with Command–S or Ctrl–S.
- Press S on selected text, a selected highlight, or immediately after
making a highlight to attach a pop-up note. The Notes button also works
with selected text or a highlight. Click the note icon to reopen it.
With no selection, Notes opens the sidebar.
- Use Draw and Add or edit images for other annotations.
- Click a linked citation to open its arXiv page, DOI, or paper URL in your
browser. Option-click or Alt-click to jump to the bibliography.
Unresolved citations also jump to the bibliography. The arXiv destination
and citation hopping are configurable in VS Code settings.
Citation hopping supports named LaTeX bibliography links. For a recognizable
title without a link, it queries arXiv when you click and opens only a unique,
exact title match. Embedded figures and section links follow PDF navigation.
Send PDF annotations to Codex and Claude Code
In a trusted local VS Code window, select PDF text or click a saved highlight.
Click the Codex or Claude Code icon above it to add an excerpt to that
extension's chat draft. Paper Viewer automatically includes the paper filename,
page number, highlighted text, and any attached note. Each icon appears when
its extension is available. You can add a question and send the draft when ready.
macOS Preview compatibility
Paper Viewer saves highlights and notes as annotations inside the PDF. Save
the file in VS Code, then open that same PDF in Preview. Choose
View → Highlights and Notes to see saved highlights and their notes.
You can also open a PDF annotated in Preview, remove its highlights, and
edit its notes in Paper Viewer. Save the PDF before switching between apps
so the other viewer can load the latest changes.
Develop
npm ci
npm run compile
npm test
npm run package
Press F5 in VS Code to launch an Extension Development Host. The custom
editor is in src/pdfProvider.ts. The webview glue is in lib/main.mjs.
If updating PDF.js, reapply the annotation hooks in lib/pdfjs/build/pdf.mjs
and lib/pdfjs/build/pdf.worker.mjs, plus the note dialog and keyboard
shortcut changes in lib/pdfjs/web/viewer.mjs.
Credits and licenses
- Tomoki Maruyama and the vscode-pdf contributors built the original VS Code
PDF extension. vscode-pdf
- Max Hölper's PDF Markup fork added the custom editor, annotation tools, and
in-place PDF saving that Paper Viewer builds on. PDF Markup
- Mozilla and the PDF.js contributors built the renderer and viewer used by
both projects. PDF.js
- Jeffry Cacho's arXiv Hop extension supplies the citation resolver adapted for
Paper Viewer. arXiv Hop
Paper Viewer is MIT-licensed. The bundled PDF.js is licensed under Apache 2.0.
Project license · PDF.js license