Markdown → PDF & WordYour AI writes Markdown. Your boss wants a Word doc. One click — cleaned, branded, done. A Visual Studio Code extension that turns Markdown into clean, professional documents — PDF, Word (.docx), or HTML — with a visual customization studio, reusable document profiles, an AI tone-polish engine, and a rule-based cleanup system that strips AI clutter. No Pandoc. No CSS. No setup. Table of Contents
📖 AboutMarkdown is great for developers and AI tools, but raw Markdown to PDF & Word solves this entirely inside VS Code. It cleans the Markdown, applies a professional layout (cover page, branding, headers/footers, table of contents), optionally polishes the tone with your preferred AI provider, and exports a polished PDF, Word, or HTML document you can send to anyone — all in one click, with nothing else to install (no Pandoc, no external tools). It is designed for developers who dislike reading raw Markdown and who frequently need to share AI- or hand-written Markdown as a real, presentable document. 🎯 Why This ExtensionMost existing tools do one piece of this. None combine them:
✨ Features🧹 Cleanup Engine (Offline, No AI)Rule-based removal of AI conversational filler — "Certainly! Here's…", "Let me know if…" — emoji, inconsistent heading spacing, smart quotes/dashes, and excessive blank lines. 100% offline and deterministic. Toggle each rule on/off in the studio. 🎨 Customization StudioA visual panel — no CSS required — to set a cover page, brand colors, fonts, header/footer, page numbers, and layout. Includes a page-accurate live preview (real A4/Letter/Legal sheet, portrait/landscape, margins, header/footer bands), zoom controls (in/out/fit-to-width), a draggable splitter, and a fullscreen mode. 📁 Document ProfilesSave your look as a reusable profile in 🤖 AI Tone PolishOptionally polish your markdown through OpenAI, Claude, Gemini, or OpenRouter before export. See the AI section for details. 📄 Rich Markdown Rendering
📂 Folder Gather + ReorderGather every 📦 Three Export Formats
All exports embed relative images automatically. 🧼 Clean UIBuilt with official VS Code Codicons — no emoji anywhere in the product UI. 🤖 AI Tone Polish
The AI tone polish feature lets you run your markdown through a large language model before export — cleaning up phrasing, removing awkward sentences, and making the language professional, clear, and confident — all while preserving structure, code blocks, and data. How It Works
Supported Providers
Configuration
Commands
Security
Default System PromptThe polish is guided by a carefully crafted system prompt that instructs the AI to:
You can edit the prompt freely in the studio and reset to default at any time. 📥 InstallationFrom VS Code Marketplace (recommended)
Or install from the command line:
From a
|
| Command | Description |
|---|---|
Markdown to PDF & Word: Open Customization Studio |
Visual editor + live preview + export buttons |
Markdown to PDF & Word: Export as PDF |
Clean + render the active file to PDF |
Markdown to PDF & Word: Export as Word (DOCX) |
Clean + render the active file to Word (no Pandoc) |
Markdown to PDF & Word: Export as HTML |
Clean + render the active file to HTML |
Markdown to PDF & Word: Clean Markdown |
Open a cleaned copy of the active file |
Markdown to PDF & Word: Gather Folder into One Document |
Combine all .md in a folder into one document |
Markdown to PDF & Word: Configure AI API Key |
Set a provider's API key |
Markdown to PDF & Word: Test AI API Key |
Validate a stored key |
Markdown to PDF & Word: Clear All AI API Keys |
Delete all stored keys |
⚙️ Settings
| Setting | Default | Description |
|---|---|---|
markready.defaultProfile |
HR Formal |
Profile used by the quick export commands |
markready.chromePath |
"" |
Optional path to a Chrome/Edge/Chromium executable for PDF export |
markready.cleanup.removeChatter |
true |
Remove AI intros/outros |
markready.cleanup.removeEmoji |
true |
Strip emoji from headings and text |
markready.cleanup.normalizeHeadings |
true |
Normalize heading spacing |
markready.cleanup.normalizeWhitespace |
true |
Collapse excessive blank lines |
markready.cleanup.normalizePunctuation |
true |
Convert smart quotes/dashes to ASCII |
markready.ai.defaultProvider |
"openai" |
Default AI provider (openai, claude, gemini, openrouter) |
markready.ai.defaultModel |
"" |
Default AI model (empty = provider default) |
markready.ai.defaultTemperature |
0.3 |
AI response creativity (0.0 – 1.0) |
🔧 How It Works
.md → front matter + cleanup (rules, no AI) → markdown-it (+highlight/math/GFM)
→ AI polish (optional, BYO key) → HTML + cover + TOC + CSS
→ PDF (Chrome/Edge) | DOCX (no Pandoc) | HTML
↑
Document Profile (JSON)
The Customization Studio edits the Profile JSON and renders the preview through the same pipeline used for export, so what you see is what you get.
📁 Document Profiles
A profile is a small JSON file describing the cover page, branding, header/footer, layout, options, and AI polish configuration. Saving a profile writes it to:
<your-project>/.markready/profiles/<profile-name>.json
Commit this file to your repository and everyone on the team exports documents with the same look. Built-in presets are available out of the box and can be cloned and customized.
🔨 Build From Source
# 1. Clone
git clone https://github.com/anandsundaramoorthysa/markdown-to-pdf-word.git
cd markdown-to-pdf-word
# 2. Install dependencies (no browser download — PDF uses your installed Chrome/Edge)
npm install
# 3. Compile
npm run compile
# 4. Run the unit tests
npm test
# 5. Launch the Extension Development Host
# Press F5 in VS Code
To package a .vsix:
npm install -g @vscode/vsce
vsce package
See CONTRIBUTING.md for detailed development setup and contribution guidelines.
👥 Contributing
Contributions are welcome — bug fixes, new presets, features, or docs.
- Discuss first: for anything non-trivial, open an issue before coding
- Understand the codebase: the pipeline is
cleanup.ts → render.ts → ai/ → exporters/*, with the UI inpanel.ts(studio) andgatherPanel.ts(folder gather) - Keep the cleanup safe: the cleanup engine must never delete real content — add tests when adding rules
- Match the style: TypeScript, no emoji in code or UI (use Codicons)
See CONTRIBUTING.md for the full contribution workflow, code style guide, and development setup.
🗺 Roadmap
- [x] Code-block theme options
- [x] Page watermark
- [x] Math (KaTeX) and richer markdown (task lists, footnotes, front matter)
- [x] AI tone-polish (optional, bring-your-own-key)
- [ ] Mermaid diagrams (kept off for now to preserve the fully-offline, small-bundle promise)
- [ ] Logo positioning in header/footer
- [ ] Publish to Open VSX (for Cursor / VSCodium / Windsurf)
- [ ] More built-in profile presets
See PLAN.md for the full design and roadmap.
⭐ Star History
📄 License
This project is released under the MIT License. You are free to use, modify, and distribute it under the terms of this license. See the LICENSE file for the full text.
🙏 Acknowledgments
Built with these excellent open-source projects:
- markdown-it — Markdown parsing and rendering
- puppeteer-core — HTML to PDF via your installed browser
- html-to-docx — HTML to Word, no Pandoc
- highlight.js — code syntax highlighting
- KaTeX — fast math typesetting
- diff — text diff engine for AI polish review
- gray-matter — YAML front-matter parsing
- VS Code Codicons — the icon set used in the UI
GitHub · Marketplace · Issues · Discussions