Open files in VS Code and Cursor / Office files

Read PDFs in dark mode in VS Code

VS Code has no PDF viewer of its own. With the free PDF Reader extension, PDF pages follow your theme, so a dark theme gives dark pages. Click the moon button, or run "PDF: Toggle Dark Pages", to switch the open file. Photos keep their real colors, because the page is inverted and each raster image is then painted back in its original pixels.

Install in VS CodeMarketplace pageOpen VSX (Cursor, Windsurf, VSCodium)

Free, MIT license. Extension ID zovo.pdf-viewer-dark, version 0.2.8. Needs VS Code 1.90.0 or newer.

The same page in the light theme on the left and in dark mode on the right. The map image has the same colors on both sides.
The same page in the light theme on the left and in dark mode on the right. The map image has the same colors on both sides.

Steps in VS Code

  1. Install PDF Reader from the Marketplace, or press Ctrl+P (Cmd+P on macOS) and run ext install zovo.pdf-viewer-dark.
  2. Click any .pdf file. With a dark theme, the pages are dark.
  3. Click the moon button, or run "PDF: Toggle Dark Pages", to switch for this file.
  4. To set it for every PDF, set pdfViewer.darkMode to on or off in Settings.
  5. Prefer softer contrast? Run "PDF: Toggle Sepia Pages".

Steps in Cursor, Windsurf or VSCodium

  1. Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on macOS).
  2. Search for zovo.pdf-viewer-dark and click Install. Cursor, Windsurf and VSCodium install from Open VSX, where it is published as zovo/pdf-viewer-dark.
  3. If your editor has no gallery, download the .vsix from the Open VSX page and run "Extensions: Install from VSIX...".
  4. Then use it the same way as in VS Code.

What PDF Reader handles

What it does not do

Other options

Install counts and Open VSX status were checked on 8 November 2026. Descriptions in quotes are the extensions' own.

Questions

How do I turn dark pages off for one PDF?

Click the moon button in the toolbar. Set pdfViewer.darkMode to off to turn it off everywhere.

Why are my charts inverted but photos are not?

Photos are raster images, so the viewer repaints them in their original pixels. Vector charts are drawn as lines and text, so they are inverted with the page.

Does it work offline?

Yes. pdf.js is bundled. It makes no network calls and has no telemetry.

More about PDF Reader

Read the PDF Reader page for every feature and setting, or the source code on GitHub.

Support this work

If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.