PowerPoint Viewer for VS Code
An extension that allows you to directly preview PowerPoint files (.pptx) within VS Code.
Continuous display of all slides with vertical scrolling
Features
- 📊 Display PowerPoint files as high-quality images
- 📜 Continuous display of all slides with vertical scrolling
- 🎯 Complete rendering by LibreOffice (faithfully reproduces fonts, colors, and layouts)
- 🔍 Zoom function (50% - 200%)
- 📍 Display current slide position in the status bar
- ⚡ Complete within VS Code, no PowerPoint app required
- 🎨 Accurately display animations and complex shapes as images
Screenshots
The following features are available in the preview screen:
- Continuous display of all slides by scrolling
- Display number on each slide
- Display PowerPoint appearance exactly as images
- UI compatible with VS Code themes
Prerequisites
To use this extension, the following software must be installed on your system:
1. LibreOffice
Used to convert PowerPoint files to PDF.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libreoffice
macOS:
brew install --cask libreoffice
Windows:
Download and install from the LibreOffice Official Website
2. Poppler
Used to convert PDF to images.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install poppler-utils
macOS:
brew install poppler
Windows:
Download and configure Poppler for Windows
📘 Detailed Guide for Windows
Windows users should check WINDOWS-SETUP.md for detailed setup instructions (with screenshots).
Simplified Windows Steps:
- Install LibreOffice
- Download Poppler and extract to
C:\poppler
- Add the following to the PATH environment variable:
C:\Program Files\LibreOffice\program
C:\poppler\Library\bin
- Restart Command Prompt and verify:
soffice --version and pdftoppm -v
Installation
Installing Development Version
- Clone this repository:
git clone <repository-url>
cd vscode-powerpoint-viewer
- Install dependencies:
npm install
- Compile TypeScript:
npm run compile
- Run for development in VS Code:
- Press F5 to launch the Extension Development Host
Installing from VSIX File
- Package the extension:
npm install -g @vscode/vsce
vsce package
- Install the generated
.vsix file into VS Code:
Ctrl+Shift+P (Mac: Cmd+Shift+P) in VS Code
- Select "Extensions: Install from VSIX..."
- Select the generated
.vsix file
Usage
Method 1: Right-click the file
- Right-click the
.pptx file in Explorer
- Select "Open With..."
- Select "PowerPoint Preview"
Method 2: From Command Palette
- Open a
.pptx file
- Open Command Palette with
Ctrl+Shift+P (Mac: Cmd+Shift+P)
- Run "PowerPoint: Open Preview"
Method 3: Set as Default Editor
- Right-click the
.pptx file
- "Open With..." → "Configure Default Editor for '*.pptx'..."
- Select "PowerPoint Preview"
Examples
Review Presentation
- Right-click a .pptx file in the project
- Select "Open With..." → "PowerPoint Preview"
- Check all slides by scrolling
Compare Multiple Presentations
- Open multiple .pptx files
- Display each with "PowerPoint Preview"
- Switch tabs to compare contents
Navigation
The following operations are possible in the preview screen:
- Mouse Wheel/Trackpad: Continuous display of all slides
- Current Slide: Displayed in status bar
Zoom Function
- Zoom In: "+" button in header or
Ctrl/Cmd + +
- Zoom Out: "−" button in header or
Ctrl/Cmd + -
- Reset: "⟲" button in header or
Ctrl/Cmd + 0
- Mouse Wheel:
Ctrl/Cmd + Wheel to zoom
- Zoom Range: 50% - 200%
Status Bar
Displays the following information at the bottom of the screen:
- 📄 Current Slide Number / Total Slides
- 🔍 Current Zoom Level
- File Name
Troubleshooting
Error "LibreOffice is not installed"
Check if LibreOffice is installed on your system. You can verify by running the following in the command line:
soffice --version
Error "Poppler is not installed"
Check if Poppler is installed on your system. You can verify by running the following in the command line:
pdftoppm -v
Preview does not appear
- Check if LibreOffice and Poppler are installed correctly
- Check if the file is not corrupted (verify if it opens in PowerPoint)
- Check for errors in the VS Code Developer Console (Help → Toggle Developer Tools)
Presentations with large files or many slides may take time to convert. After the initial conversion, results are cached as temporary files.
Development
Build
npm run compile
Watch Mode
npm run watch
Debug
- Open this project in VS Code
- Press F5 to launch the Extension Development Host
- Open a
.pptx file in the Development Host to test
License
MIT License
Contribution
Pull requests are welcome! Please report bugs and feature requests in Issues.
Future Plans
- [ ] Slide zoom function
- [ ] Jump to specific slide function
- [ ] Presentation mode
- [ ] Slide search function
- [ ] Comparison view of multiple presentations
- [ ] Improve cache management
Technical Details
This extension uses the following tools:
Process Flow:
- Convert PowerPoint file (.pptx) to PDF with LibreOffice
- Convert PDF to high-resolution JPEG images with Poppler
- Base64 encode images and embed in WebView
- Display as vertically scrollable HTML