Modern PDF Preview (WASM)
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
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