Skip to content

Your editor ​

Export the file you are writing with one keystroke, or ask your AI assistant. One-time setup, then nothing more.

The easy way: open Studio and press Add to my editor. Or paste this in a terminal; it finds your editors and asks, one by one, whether to set them up:

npx -y markdown-pdf-export setup

Or pick yours:

1. Set up, once. Press Add to my editor in Studio, or do it by hand:

For the export command. Run Tasks: Open User Tasks from the Command Palette and add:

json
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Markdown: Export to PDF",
      "type": "process",
      "command": "npx",
      "args": ["-y", "markdown-pdf-export", "${file}"],
      "problemMatcher": []
    }
  ]
}

For Copilot Chat. Run this once in a terminal:

sh
code --add-mcp '{"name":"markdown-pdf","command":"npx","args":["-y","markdown-pdf-export","mcp"]}'

2. Use it.

  • Export: open a Markdown file, then Terminal → Run Task… → Markdown: Export to PDF.
  • Ask: in Copilot Chat agent mode, type Export this file to PDF.

All of these use the look you saved in Studio. The PDF is written next to your Markdown file, with the same name.

Every command and option: Advanced

Released under the MIT License.