ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

md2pdf

Markdown 转 PDF 技能。将 Markdown 文件转换为精美的 PDF 文档,完美支持中文、代码高亮、自定义样式。

Why use this skill?

Efficiently convert Markdown files to high-quality PDFs with OpenClaw md2pdf. Features perfect CJK support, code highlighting, and automated dependency management.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/franklu0819-lang/markdown-pdf
Or

What This Skill Does

The md2pdf skill is a powerful utility designed to convert Markdown files into professional-grade PDF documents. By leveraging the WeasyPrint engine, it eliminates the complexity of traditional LaTeX-based workflows while offering superior aesthetic control. It supports advanced features such as code syntax highlighting, clean table formatting with zebra-striping, and perfectly rendered Chinese characters via the Noto Sans CJK font. Whether you are generating technical reports, documentation, or personal notes, this skill ensures your Markdown content is transformed into polished, reader-friendly PDFs with minimal effort.

Installation

You can install this skill directly through the OpenClaw platform using the CLI. Execute the following command in your terminal:

clawhub install openclaw/skills/skills/franklu0819-lang/markdown-pdf

This command automatically fetches the necessary Python dependencies and registers the scripts in your workspace. The skill includes an auto-dependency installer that triggers upon the first execution, ensuring that required packages like WeasyPrint and the necessary system fonts are configured without manual intervention.

Use Cases

  • Documentation Export: Convert technical project READMEs or internal Wikis into shareable PDF manuals.
  • Report Generation: Create clean, styled reports from raw data notes or project meeting transcripts written in Markdown.
  • Content Archiving: Transform blog drafts or knowledge base articles into consistent, print-ready documents with professional code styling.
  • Offline Reading: Convert long-form articles into PDFs for tablet reading while maintaining perfect CJK character support.

Example Prompts

  1. "Convert my meeting-notes.md file to a PDF named Project_Review_Final.pdf using the recommended WeasyPrint method."
  2. "I need to export the technical documentation in my workspace. Can you iterate through all markdown files in the current folder and convert them to PDFs using the md2pdf skill?"
  3. "Please generate a PDF from draft.md. Use the professional styling features for code blocks and tables to make it look like a published technical guide."

Tips & Limitations

  • Tip: Always prefer the convert-weasyprint.sh script for the best results, as it includes the most robust CSS styling for tables and code blocks.
  • Tip: If you are working with extremely large documents, ensure your system has sufficient memory as WeasyPrint renders full document layouts in memory.
  • Limitation: While the skill handles most standard Markdown, complex nested HTML within Markdown files might require specific CSS overrides to maintain formatting integrity.
  • Limitation: Pandoc-based conversion is provided for legacy compatibility but requires a pre-installed LaTeX environment (XeLaTeX).

Metadata

Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-franklu0819-lang-markdown-pdf": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#markdown#pdf#converter#documentation#formatting
Safety Score: 4/5

Flags: file-write, file-read, code-execution