Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown PDF and HTMLNew to Visual Studio Code? Get it now.
Markdown PDF and HTML

Markdown PDF and HTML

Markdown PDF and HTML

|
18 installs
| (3) | Free
Export Markdown to HTML and PDF with mermaid support.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown to PDF and HTML

How to Use

  1. Install the extension from the Marketplace.

  2. Open a Markdown file.

  3. Run one of the commands (Command Palette or right-click):

    • Markdown: Export to HTML/PDF — create both files.
    • Markdown: Export PDF only — create PDF only.
    • Markdown: Export HTML only — create HTML only.
  4. Output files are saved next to the Markdown file by default.

  5. Pandoc is required; if it’s not installed, the extension will show a helpful installation hint.

Defaults

  • PDF format: A3
  • Uses the built-in stylesheet unless you specify a custom CSS path.

Configuration

Configure the extension in VS Code via either:

  1. User Settings: applies to all projects.
  2. Workspace Settings: only for this repo—create or update .vscode/settings.json.

Example workspace config with inline hints:

{
  // Default A3. Accepts A4 | A3 | Letter | Legal | Tabloid.
  "markdownConverter.pdfFormat": "A4",

  // Custom CSS for HTML output. Relative paths resolve from the Markdown file’s folder.
  "markdownConverter.cssPath": "styles/markdown.css"
}

Relative paths (e.g., styles/markdown.css) are resolved from the folder containing the Markdown file you export.

Author

Thang Pham Dang
Developer & Maintainer
📧 phamdangthang98@gmail.com

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft