Skip to content

Add Markdown PDF extension#6223

Open
0xPatryk wants to merge 1 commit into
zed-industries:mainfrom
0xPatryk:add-markdown-pdf
Open

Add Markdown PDF extension#6223
0xPatryk wants to merge 1 commit into
zed-industries:mainfrom
0xPatryk:add-markdown-pdf

Conversation

@0xPatryk
Copy link
Copy Markdown

Adds Markdown PDF, an extension that exports Markdown files to styled PDFs from inside Zed.

What it does

Adds an Export Markdown to PDF code action (cmd-.) on Markdown buffers that writes <filename>.pdf next to the source file. Supports syntax highlighting, KaTeX math, Mermaid diagrams, task lists, footnotes, tables, custom CSS, page size, and margins.

How it works

Because the extension runs in the wasm32-wasip2 sandbox and can't spawn a browser, the WASM coordinator launches a native Node.js LSP sidecar (downloaded from this repo's GitHub Releases, per the documented latest_github_release + download_file pattern). The sidecar renders Markdown → HTML (markdown-it) and prints with headless Chromium (puppeteer-core), preferring a locally installed Chrome/Edge/Brave and falling back to a lazy chrome-headless-shell download. Requires Node.js 18+ on PATH.

extensions.toml and .gitmodules were sorted with pnpm sort-extensions.

@cla-bot cla-bot Bot added the cla-signed label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant