Skip to content

chocolatedesue/Modern-PDF-Preview

 
 

Repository files navigation

Modern PDF Preview (WASM)

Visual Studio Marketplace Last Updated Visual Studio Marketplace Version Visual Studio Marketplace Installs

GitHub issues GitHub stars GitHub license

Modern PDF Preview is a next-generation PDF viewer for VS Code, designed for speed, accuracy, and productivity.

It is built on top of PDFium WASM and wrapped with embed-pdf-viewer, delivering a Chrome-grade rendering experience directly inside your editor.

✨ Key Features

πŸš€ High Performance

Powered by WebAssembly (WASM), this extension renders large PDFs instantly without slowing down VS Code. Smooth scrolling and zooming come standard.

πŸ–ŠοΈ Annotation & Saving

Review and mark up documents directly.

  • Highlight important text.
  • Draw ink signatures or diagrams.
  • Add Notes and comments.
  • Direct Save: Press Ctrl+S (Windows/Linux) or Cmd+S (macOS) to directly overwrite the PDF file with your modifications.

🌐 Universal Support

Works everywhere you use VS Code.

  • Desktop: Full features supported on Windows, macOS, and Linux.
  • Web: Supports VS Code for Web (vscode.dev) and GitHub Codespaces.
    • Note: The Web version is optimized for viewing only. Other features (like annotation saving) are not guaranteed to work in the browser environment.
  • Privacy-First: All rendering happens locally. Your data never leaves your machine (or browser sandbox).

βš™οΈ Configuration

Customize the initial viewer state in your VS Code settings:

  • modernPdfViewer.defaultZoomLevel: Initial zoom (e.g., page-width, page-fit, 100%).
  • modernPdfViewer.defaultSpreadMode: Initial spread (e.g., none, odd, even).

🎨 Seamless Integration

  • Theme Sync: Automatically adapts to Light, Dark, and High Contrast themes.
  • Rich Toolbar: Thumbnails, Outline/Bookmarks, Search, Print, and Presentation Mode.

⚠️ Resource Management Notice

  • Multiple Webviews: Each PDF document opens in its own independent Webview container.
  • No Automatic Recycling: The extension does not implement an automatic LRU (Least Recently Used) recycling mechanism for open documents.
  • Memory Usage: To ensure high performance and context retention (retainContextWhenHidden: true), Webviews are kept in memory even when hidden.
  • Recommendation: Please manually close PDF tabs you are no longer using to free up system resources, especially when dealing with very large files.

πŸ“¦ Installation & Search

πŸ” Search

Search for "Modern PDF Preview" in the VS Code Extensions panel or use the ID: chocolatedesue.modern-pdf-preview.

πŸ“š Documentation

πŸ“œ Credits & License

This project is an evolution of vscode-pdf-viewer and uses:

License: MIT

About

PDF Viewer for Visual Studio Code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 80.2%
  • Svelte 15.4%
  • Shell 2.9%
  • HTML 1.5%