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)
- Toolbar Toggle - Hide/show toolbar for distraction-free reading experience
- 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
- 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+H/Cmd+H- Toggle ToolbarEscape- Close Search Panel
- Zoom Controls - Precise zoom adjustment (50% to 300%)
- Outline Toggle - Show/hide document structure
- Theme Toggle - Switch between light/dark modes
- Search - Quick text search with navigation
- Toolbar Toggle - Hide toolbar for distraction-free reading
- Install from the VS Code Marketplace
- Open any
.docxor.odtfile - 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
.docxor.odtfile β "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+Fto find text - Zoom: Use toolbar buttons or keyboard shortcuts
- Toolbar Toggle: Click the β button to hide toolbar, or press
Ctrl+Hto toggle
For a cleaner reading experience:
- Hide Toolbar: Click the β button or press
Ctrl+H - Show Toolbar: Click the βοΈ gear icon that appears in the top-right corner
- Quick Toggle: Use
Ctrl+Hkeyboard shortcut anytime
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
Outline navigation issues:
- If clicking on outline items doesn't navigate correctly, ensure you're using version 1.2.2 or later
- For documents with duplicate heading names, the extension now correctly navigates to the specific section (fixed in v1.2.2)
Toolbar visibility issues:
- If toolbar doesn't hide/show properly, ensure you're using version 1.3.0 or later
- The mini toggle button (βοΈ) appears in the top-right corner when toolbar is hidden
- Use
Ctrl+Hkeyboard shortcut as an alternative to button clicks
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: Toolbar toggle functionality - Hide/show toolbar for distraction-free reading (Fixes #19)
- β¨ New: Mini toolbar toggle button appears when main toolbar is hidden
- β¨ New: Keyboard shortcut
Ctrl+Hto toggle toolbar visibility - β¨ New: Smooth animations for toolbar transitions
- β¨ New: VS Code command palette integration for toolbar toggle
- π§ Improved: Better user experience with non-intrusive design
- π§ Improved: Enhanced UI controls for toolbar management
- π Fixed: Outline navigation for duplicate heading names (Issue #17)
- π§ Improved: Enhanced heading ID generation for unique navigation
- π§ Improved: Better handling of documents with repeated section names
- π¨ New: Theme toggle button for light/dark mode switching
- π§ Improved: Enhanced theme consistency across all UI elements
- β¨ 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