Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>vscode-pdf-forkNew to Visual Studio Code? Get it now.
vscode-pdf-fork

vscode-pdf-fork

Sohang Chopra

|
1 install
| (0) | Free
Display pdf file in VSCode. Fork of tomoki1207/vscode-pdfviewer .
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

pdf

Display pdf in VSCode. Allows highlighting text, i.e., creating & saving text annotations. Fork of https://github.com/tomoki1207/vscode-pdfviewer .

screenshot

Contribute

Highlight PDF text

Select text in the PDF preview and click Highlight in the toolbar. The selection is stored as a standard PDF highlight annotation and becomes part of the document when you save it. Highlights can span multiple lines and pages; the preview keeps unsaved highlights when it reloads. Annotation creation can be done, but editing and removal are not currently supported.

Installing Extension locally & Developing any changes

After cloning this repo, run:

$ npm install            # creates node_modules/ folder
$ npm run compile        # creates out/ folder (compile TypeScript into JavaScript files)
$ npm test               # runs the automated extension tests
  • Press F5 to open a new VS Code window with this extension loaded.
  • After making any changes to this extension, relaunch extension from debug toolbar, or else reload the opened VS Code window.

Upgrade PDF.js

  1. Download latest Prebuilt(older browsers).
  2. Extract the ZIP file.
  3. Overwrite ./lib/* by extracted directories.
    • If lib/web/viewer.html has changes, apply these changes to HTML template at pdfPreview.ts.
  4. To not use sample pdf.
  • Remove sample pdf called compressed.tracemonkey-pldi-09.pdf.
  • Remove code about using sample pdf from lib/web/viewer.js.
    defaultUrl: {
      value: "", // "compressed.tracemonkey-pldi-09.pdf"
      kind: OptionKind.VIEWER
    },
    

Change log

See CHANGELOG.md.

License

Please see LICENSE

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