Skip to content
Back to search

zed-markdown-pdf-export

Zed extension for markdown-pdf-export: Markdown to PDF with your header, footer, page numbers and logo, from Zed's Agent.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/matinfo-tech--zed-markdown-pdf-export/badge.svg)](/listings/matinfo-tech--zed-markdown-pdf-export)

HTML

<a href="/listings/matinfo-tech--zed-markdown-pdf-export"><img src="/api/listings/matinfo-tech--zed-markdown-pdf-export/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

> **Not in the Zed extension list yet.** Zed has paused new MCP server extensions while it moves to > the [official MCP registry](https://registry.modelcontextprotocol.io/) > ([zed-industries/zed#59351](https://github.com/zed-industries/zed/issues/59351)). The server is > already there as `io.github.matinfo-tech/markdown-pdf-export`. Until Zed lists it, use one of the > two ways below.

**As a dev extension** (needs [Rust](https://rustup.rs); Zed builds it for you):

1. `git clone https://github.com/matinfo-tech/zed-markdown-pdf-export` 2. In Zed, open the Command Palette and run `zed: install dev extension`, then choose the folder. 3. Check **Settings → AI → MCP Servers**: the `markdown-pdf` dot turns green after the first start (the first one takes a few seconds while Zed downloads the exporter).

**Without the extension** (needs [Node.js](https://nodejs.org) 20 or later): run `npx -y markdown-pdf-export setup zed`. It adds the Agent tools, an export task and a keyboard shortcut to your Zed files. See [the Zed instructions](https://markdown-pdf.matinfo.tech/editors).

Already added the server by hand (a `context_servers.markdown-pdf` entry with a `command`)? Remove that entry before installing the extension, or it keeps replacing the extension's server.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 170 lines
  1. # Markdown PDF Export for Zed
  2. [![CI](https://github.com/matinfo-tech/zed-markdown-pdf-export/actions/workflows/ci.yml/badge.svg)](https://github.com/matinfo-tech/zed-markdown-pdf-export/actions/workflows/ci.yml)
  3. [![npm](https://img.shields.io/npm/v/markdown-pdf-export?label=markdown-pdf-export)](https://www.npmjs.com/package/markdown-pdf-export)
  4. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
  5. Export Markdown to PDF from Zed's Agent, with your header, footer, page numbers and logo.
  6. This extension adds the [markdown-pdf-export](https://markdown-pdf.matinfo.tech) MCP server to
  7. Zed. Install it and ask the Agent:
  8. > Export this file to PDF.
  9. ## Features
  10. - **No setup.** Zed downloads the exporter from npm, keeps it up to date and runs it with its own
  11. Node. No terminal, no Node install, no `settings.json` editing.
  12. - **Real page design.** Page styles, fonts, headers and footers with page numbers, logos, table of
  13. contents, maths (KaTeX) and code highlighting.
  14. - **Studio.** Ask the Agent to *open Studio* to design your pages with a live PDF preview.
  15. - **One settings file** shared with the command line and the other editors (VS Code, Cursor,
  16. Claude...). Design once, same PDFs everywhere.
  17. - **Local export.** The exporter runs on your computer and sends nothing anywhere; the PDF is drawn
  18. by your own Chrome or Edge. (What the Agent shares with its AI provider is up to your Zed setup.)
  19. ## Requirements
  20. - Zed with the **Agent** set up with an AI provider. The extension adds tools for the Agent; it does
  21. not add a menu item or a keyboard shortcut (Zed extensions cannot), so without the Agent there is
  22. nothing to call them. Without an AI provider, use the
  23. [keyboard shortcut](#keyboard-shortcut-no-ai-needed) instead.
  24. - Google Chrome or Microsoft Edge. If neither is installed, ask the Agent to install the PDF
  25. browser: it downloads Chromium once (about 200 MB).
  26. ## Install
  27. > **Not in the Zed extension list yet.** Zed has paused new MCP server extensions while it moves to
  28. > the [official MCP registry](https://registry.modelcontextprotocol.io/)
  29. > ([zed-industries/zed#59351](https://github.com/zed-industries/zed/issues/59351)). The server is
  30. > already there as `io.github.matinfo-tech/markdown-pdf-export`. Until Zed lists it, use one of the
  31. > two ways below.
  32. **As a dev extension** (needs [Rust](https://rustup.rs); Zed builds it for you):
  33. 1. `git clone https://github.com/matinfo-tech/zed-markdown-pdf-export`
  34. 2. In Zed, open the Command Palette and run `zed: install dev extension`, then choose the folder.
  35. 3. Check **Settings → AI → MCP Servers**: the `markdown-pdf` dot turns green after the first start
  36. (the first one takes a few seconds while Zed downloads the exporter).
  37. **Without the extension** (needs [Node.js](https://nodejs.org) 20 or later): run
  38. `npx -y markdown-pdf-export setup zed`. It adds the Agent tools, an export task and a keyboard
  39. shortcut to your Zed files. See [the Zed instructions](https://markdown-pdf.matinfo.tech/editors).
  40. Already added the server by hand (a `context_servers.markdown-pdf` entry with a `command`)? Remove
  41. that entry before installing the extension, or it keeps replacing the extension's server.
  42. ## Use
  43. Ask the Agent in plain words. Examples:
  44. ```text
  45. Export this file to PDF.
  46. Export docs/guide.md to PDF in landscape on Letter paper, with a table of contents.
  47. Export report.md with "Page {page} of {pages}" in the footer.
  48. Open Studio so I can design my pages.
  49. Open Studio with report.md as the preview, for this project only.
  50. Install the PDF browser.
  51. Run the Markdown PDF doctor.
  52. ```
  53. | Tool | What it does |
  54. |---|---|
  55. | `export_markdown_pdf` | Exports one Markdown file to PDF. Any setting can be changed for one export. |
  56. | `open_studio_markdown_pdf` | Opens Studio in your browser. Saved choices apply to the next export. |
  57. | `install_browser_markdown_pdf` | Downloads Chromium when no Chrome or Edge is found. Asks first. |
  58. | `doctor_markdown_pdf` | Reports the browser in use and the settings files loaded. |
  59. Zed asks before the Agent runs a tool, unless you allowed it in `agent.tool_permissions`.
  60. ## Keyboard shortcut (no AI needed)
  61. A Zed extension cannot add a command or a key, but the exporter's own setup can. With
  62. [Node.js](https://nodejs.org) 20 or later installed, run this once in a terminal:
  63. ```sh
  64. npx -y markdown-pdf-export setup zed
  65. ```
  66. Then, in a Markdown file, press **⌘K ⌘E** on a Mac or **Ctrl+K Ctrl+E** on Windows and Linux to
  67. export it to PDF. The same export is in the Command Palette: `task: spawn` → *Markdown: Export to
  68. PDF*.
  69. Setup adds one task to `tasks.json` and one key to `keymap.json`, leaves everything else in those
  70. files as it was (comments included) and keeps a copy of each as `<file>.markdown-pdf.bak`. With this
  71. extension installed it does not touch `settings.json`: the extension already provides the Agent
  72. tools. Needs markdown-pdf-export 2.3.0 or later.
  73. ## Settings
  74. Page design (look, fonts, header, footer, logo, paper size...) lives in the markdown-pdf-export
  75. settings file, not in Zed. The easiest way to edit it is Studio. The file is:
  76. - macOS and Linux: `~/.config/markdown-pdf-export/settings.json`
  77. - Windows: `%APPDATA%\markdown-pdf-export\settings.json`
  78. A `.markdown-pdf.json` file in a project folder changes the settings for the documents in that
  79. folder only. See [the settings reference](https://markdown-pdf.matinfo.tech/advanced/settings-file).
  80. The extension itself has three optional settings. Set them in **Settings → AI → MCP Servers →
  81. markdown-pdf → Configure**, which writes them to Zed's `settings.json`:
  82. ```json
  83. {
  84. "context_servers": {
  85. "markdown-pdf": {
  86. "settings": {
  87. "browser": "msedge"
  88. }
  89. }
  90. }
  91. }
  92. ```
  93. | Setting | Value |
  94. |---|---|
  95. | `browser` | `chrome`, `msedge`, `chromium`, a preview channel such as `chrome-beta`, or the full path to a browser program. Default: Chrome, then Edge, then the downloaded Chromium. |
  96. | `settings_file` | Full path to another settings file, used instead of the shared one. Studio always edits the shared file. |
  97. | `debug` | `true` writes a log to `markdown-pdf-debug.log` in the temp folder. |
  98. ## Troubleshooting
  99. - **The server dot stays red.** Open the log with `zed: open log` and look for `markdown-pdf`. The
  100. first start needs internet access to download the exporter from npm.
  101. - **"No usable Chrome/Chromium browser found".** Ask the Agent to install the PDF browser, or set
  102. `browser` to the path of a Chromium-based browser.
  103. - **Studio changes do not show up.** Check that `settings_file` is empty: when it is set, the server
  104. reads that file and not the one Studio edits.
  105. - More help: <https://markdown-pdf.matinfo.tech/help>.
  106. ## How it works
  107. The extension is a small WebAssembly module. When Zed starts the `markdown-pdf` context server, it:
  108. 1. installs or updates the [`markdown-pdf-export`](https://www.npmjs.com/package/markdown-pdf-export)
  109. npm package in the extension's folder (version 2.2.0 or later; an installed copy is used when
  110. offline);
  111. 2. runs `cli.mjs mcp` from that package with Zed's Node;
  112. 3. passes the settings above as `MARKDOWN_PDF_BROWSER`, `MARKDOWN_PDF_SETTINGS` and
  113. `MARKDOWN_PDF_DEBUG`.
  114. All the exporting is done by the npm package; its code and issue tracker are at
  115. [matinfo-tech/markdown-pdf-export](https://github.com/matinfo-tech/markdown-pdf-export).
  116. ## Development
  117. Requirements: [Rust](https://rustup.rs) with the `wasm32-wasip2` target.
  118. ```sh
  119. rustup target add wasm32-wasip2
  120. cargo test # unit tests (native)
  121. cargo clippy --target wasm32-wasip2 -- -D warnings
  122. cargo build --release --target wasm32-wasip2
  123. ```
  124. To try it in Zed: Command Palette → `zed: install dev extension` → choose this folder. After a
  125. change, click **Rebuild** on the extension in `zed: extensions`.
  126. ## License
  127. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.