Overview
In addition to converting various document formats to Markdown, MkDowner also supports the reverse operation: converting Markdown files to Word documents. This feature is available through a separate route at/pandoc and is powered by the PandocConverter component.
Access the Markdown-to-Word converter by navigating to
/pandoc in your browser when running the application.Features
Markdown Input
Upload .md files for conversion
DOCX Output
Download professional Word documents
Progress Tracking
Real-time conversion progress visualization
File Size Support
Supports Markdown files up to 16MB
How It Works
User Flow
Component Implementation
ThePandocConverter component (~/workspace/source/src/PandocConverter.tsx) handles the entire Markdown-to-Word conversion flow:
State Management
File Upload
The component accepts only.md files:
API Request
Sends the Markdown file to the/md-to-word endpoint:
Note the difference: this endpoint uses
'file' (singular) instead of 'files' (plural) used in the main upload endpoint.File Download
Downloads the converted DOCX file:Routing
The application uses React Router to provide two separate interfaces:| Route | Component | Purpose |
|---|---|---|
/ | App | Main converter (any format → Markdown) |
/pandoc | PandocConverter | Markdown → Word conversion |
API Endpoint
POST /md-to-word
Converts a Markdown file to Word format. Request:Differences from Main Converter
| Feature | Main App (/) | Pandoc (/pandoc) |
|---|---|---|
| Input formats | PDF, DOCX, PPTX, images, etc. | Markdown (.md) only |
| Output format | Markdown (.md) | Word (.docx) |
| Multiple files | ✅ Yes (creates .zip) | ❌ No (single file only) |
| File size limit | 24MB | 16MB |
| API endpoint | /upload | /md-to-word |
| FormData key | 'files' (plural) | 'file' (singular) |
Use Cases
Documentation Publishing
Convert Markdown documentation to Word format for:- Corporate document standards
- Print publishing workflows
- Stakeholder reviews requiring Word format
Content Migration
Convert Markdown content to Word when:- Moving from static site generators to traditional CMS
- Sharing with non-technical collaborators
- Creating editable templates from Markdown sources
Collaborative Editing
Export Markdown to Word for:- Track changes functionality
- Comments and annotations
- Integration with Microsoft 365 workflows
Limitations
- Single file only: Unlike the main converter, this does not support multiple files
- File size limit: 16MB maximum (smaller than the 24MB limit for the main converter)
- Markdown only: Only accepts files with
.mdextension - No preview: Files are converted and downloaded without preview
Testing the Endpoint
You can test the Markdown-to-Word endpoint with curl:Future Enhancements
Potential improvements for the Markdown-to-Word feature:- Multiple file support with ZIP output
- Markdown preview before conversion
- Custom Word template selection
- Style preservation options
- Metadata configuration (author, title, etc.)