Skip to content
Agentmart
Submit a tool
This entry duplicates export-markdown-pdf, which is the one we list in search.

export-markdown-pdf

将 Markdown 文档导出为中文不乱码、格式尽量保持一致的 PDF

Skill by wxxz123

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/wxxz123-export-markdown-pdf

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

将 Markdown 文档导出为中文不乱码、格式尽量保持一致的 PDF

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
export-markdown-pdf
Description
将 Markdown 文档导出为中文不乱码、格式尽量保持一致的 PDF
License
MIT
Instructions
48 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (2)

  • SKILL.md
  • run.py · scripts/

SKILL.md (first lines)

# export-markdown-pdf

## Description
将 Markdown 文档导出为中文不乱码、格式尽量保持一致的 PDF。

## Keywords
- markdown转pdf
- markdown 转 pdf
- md转pdf
- md 转 pdf
- 导出pdf
- 转pdf
- markdown pdf
- export markdown pdf
- pdf导出

## When To Use
- 需要把项目中的 `*.md` 文档导出为 PDF
- 需要尽量保留标题、列表、引用、代码块等 Markdown 样式
- 需要避免中文乱码
- 当前环境是 Windows,并且可使用 Word COM 导出 PDF

## Script
- 脚本路径:`skills/export-markdown-pdf/scripts/run.py`
- 在 Agent 的 `<action>` 中,必须通过工具调用执行脚本,不要直接输出 shell 命令。
- 推荐调用格式:`run_terminal_command("python skills/export-markdown-pdf/scripts/run.py \"<input.md>\" \"<output.pdf>\"")`

## Steps
1. 先确认要导出的 Markdown 文件路径存在,并使用绝对路径。
2. 如果当前是在 Agent 的 `<action>` 中执行,必须写成函数调用,例如 `run_terminal_command("python skills/export-markdown-pdf/scripts/run.py \"<input.md>\" \"<output.pdf>\"")`。
3. 不要在 `<action>` 中直接写 `python ...`、不要输出代码块、不要输出自然语言说明。
4. 如果需要保留中间 HTML 以便排查样式问题,可在命令字符串末尾追加 `--keep-html`。
5. 导出完成后,确认 PDF 文件已生成,并告知用户输出路径。

## Notes
- 脚本内部流程是:Markdown -> UTF-8 HTML -> Word 导出 PDF。
- 这种方式在当前项目环境下更适合处理中文,且能较好保留现有格式。
- 如果用户只要求导出 PDF,默认不保留中间 HTML;只有在需要排查样式时才使用 `--keep-html`。
- 如果需要执行终端命令,`<action>` 的内容必须是 `run_terminal_command(...)`,而不是裸的 shell 命令。

## Examples
```text
run_terminal_command("python skills/export-markdown-pdf/scripts/run.py \"<input.md>\"")
run_terminal_command("python skills/export-markdown-pdf/scripts/run.py \"<input.md>\" \"<output.pdf>\"")
run_terminal_command("python skills/export-markdown-pdf/scripts/run.py \"<input.md>\" --keep-html")
```

From wxxz123/CLI-Code, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Apr 16, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

Cite this page

export-markdown-pdf skill. Agent Mart. https://agentmart.dev/skills/wxxz123-export-markdown-pdf (last updated 2026-10-24)