A modern, feature-rich document viewer for Microsoft Word (.docx) and OpenDocument Text (.odt) files in Visual Studio Code.
- Microsoft Word Documents (.docx) - Full support with proper formatting
- OpenDocument Text (.odt) - Complete compatibility with LibreOffice/OpenOffice documents
- VS Code Theme Integration - Automatically adapts to your VS Code theme (dark/light/high contrast)
- Document Outline - Navigate through headings with an interactive sidebar
- Search Functionality - Find text within documents with highlighting
- Zoom Controls - Zoom in/out with keyboard shortcuts or toolbar buttons
- Print Support - Print documents directly from the viewer
- Responsive Design - Adapts to different panel sizes
- Keyboard Shortcuts - Full keyboard navigation support
- Status Bar Integration - Shows current zoom level
- Error Handling - Graceful error messages and loading states
- Performance Optimized - Fast rendering with modern CSS techniques
Ctrl+Plus
/Cmd+Plus
- Zoom InCtrl+Minus
/Cmd+Minus
- Zoom OutCtrl+0
/Cmd+0
- Reset ZoomCtrl+F
/Cmd+F
- Search in DocumentCtrl+P
/Cmd+P
- Print DocumentEscape
- Close Search Panel
- Zoom Controls - Precise zoom adjustment (50% to 300%)
- Outline Toggle - Show/hide document structure
- Search - Quick text search with navigation
- Print - Direct printing capability
- Install from the VS Code Marketplace
- Open any
.docx
or.odt
file - The document will automatically open in the enhanced viewer
Access settings via Ctrl+Shift+P
β "Open Docx Reader Configuration" or go to File β Preferences β Settings and search for "Docx Reader".
Setting | Description | Default |
---|---|---|
docxreader.font |
Font family for document rendering | Arial |
docxreader.theme |
Theme preference (auto/light/dark) | auto |
docxreader.zoomLevel |
Default zoom level (0.5 - 3.0) | 1.0 |
docxreader.showOutline |
Show document outline by default | true |
{
"docxreader.font": "Georgia",
"docxreader.theme": "auto",
"docxreader.zoomLevel": 1.2,
"docxreader.showOutline": true
}
- Right-click any
.docx
or.odt
file β "Open With" β "Docx Reader" - Double-click the file (if set as default viewer)
- Use Command Palette (
Ctrl+Shift+P
) β "View: Reopen Editor With" β "Docx Reader"
- Outline Panel: Click headings to jump to sections
- Search: Use toolbar search or
Ctrl+F
to find text - Zoom: Use toolbar buttons or keyboard shortcuts
The viewer automatically extracts and displays:
- Headings (H1-H6) in the outline
- Formatted text with proper styling
- Tables with borders and styling
- Images with responsive sizing
- Lists (numbered and bulleted)
- Block quotes and code blocks
# Clone repository
git clone https://github.com/skfrost19/Docx-Viewer.git
cd Docx-Viewer
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Run tests
npm test
# Launch development version
code --extensionDevelopmentPath=. --new-window
- TypeScript 5.8+ - Modern JavaScript with strong typing
- VS Code API 1.90+ - Latest VS Code extension capabilities
- Mammoth.js - DOCX to HTML conversion
- ODT2HTML - ODT file processing
- Modern CSS - Responsive design with CSS Grid/Flexbox
Document not loading:
- Ensure the file isn't corrupted
- Try opening with another application first
- Check file permissions
Styling issues:
- Verify VS Code theme compatibility
- Reset zoom to 100%
- Check font settings in configuration
Performance problems:
- Close other heavy extensions
- Reduce zoom level for large documents
- Enable hardware acceleration in VS Code
- Check existing Issues
- Create a new issue with:
- VS Code version
- Extension version
- Sample document (if possible)
- Error messages
- β¨ New: Modern UI with VS Code theme integration
- β¨ New: Document outline with navigation
- β¨ New: In-document search functionality
- β¨ New: Zoom controls (50% - 300%)
- β¨ New: Print support
- β¨ New: Keyboard shortcuts
- β¨ New: Status bar integration
- π§ Improved: Error handling and loading states
- π§ Improved: Performance optimization
- π§ Updated: Latest dependencies and security fixes
- π§ Updated: TypeScript 5.8+ and ESLint 9+
- Basic DOCX and ODT viewing
- Simple font configuration
- Basic VS Code integration
Contributions are welcome! Please read our Contributing Guidelines first.
- Additional file format support
- UI/UX improvements
- Performance optimizations
- Documentation improvements
- Bug fixes and testing
This project is licensed under the MIT License - see the LICENSE file for details.
- Mammoth.js for DOCX conversion
- ODT2HTML for ODT processing
- VS Code team for the excellent extension API
- Contributors and users for feedback and suggestions
Made with β€οΈ for the VS Code community