PDF Viewer & HighlighterA fork of vscode-pdf by tomoki1207, enhanced with text highlighting and editable comments. Save annotations directly to your PDF with Ctrl+S, without reloading the document. This fork is maintained and published by pupydodo. Highlight selected textRequires VS Code 1.72 or newer.
Saving also keeps the current page canvases, zoom, rotation, and scroll position. Ctrl+Z / Ctrl+Y (macOS: Cmd+Z / Cmd+Shift+Z) undo and redo highlights, including edits made before the last save. Closing a modified editor uses VS Code's normal save/discard handling. Save As, Revert File, and recovery of unsaved changes after restarting VS Code are supported. The editor follows VS Code's Files: Auto Save setting, like a code editor. If you want to save only with Ctrl+S, leave Auto Save off. Saved highlights are standard PDF annotations: they remain after reopening the file and are visible in other PDF readers. Partial words, multiple lines, and selections across rendered pages are supported, including when zoomed or rotated. Existing text, links, and annotations are retained. The PDF must be writable and unencrypted. Scanned image-only PDFs need OCR before text can be selected. Remove highlightsClick a highlighted area, then choose Remove highlight (取消高亮 in Chinese). This removes the highlight and its comment, including any unapplied comment draft. It works for new highlights and annotations already in the PDF. The removal is staged until Ctrl+S (Cmd+S on macOS), or Auto Save. Ctrl+Z restores the highlight and its applied comment, even after saving. Grouped highlights spanning multiple pages are removed together. The viewer updates the affected pages without reloading the PDF. Edit highlight commentsClick a highlighted area (without dragging a text selection) to open its comment editor. This works for new highlights and highlights already saved in the PDF.
Comments use the PDF annotation's standard text content and remain editable after reopening, including in other PDF readers. Cross-page highlights created by this version share a comment across their pages. Editing and saving do not reload the PDF. Development
Press F5 to launch the extension in a development window. To test the browser selection and save flow, install Chromium for Playwright and run:
Alternatively set
ContributeUpgrade PDF.js
Change logSee CHANGELOG.md. LicensePlease see LICENSE |
