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 shows what to add:

npx -y markdown-pdf-export setup

Or pick yours:

  • 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.
Do it by hand

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 the AI assistant, run this once in a terminal:

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

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.