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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/franklu0819-lang/markdown-pdfWhat 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
- "Convert my meeting-notes.md file to a PDF named Project_Review_Final.pdf using the recommended WeasyPrint method."
- "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?"
- "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.shscript 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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-franklu0819-lang-markdown-pdf": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
zhipu-tts
Text-to-speech conversion using Zhipu AI (BigModel) GLM-TTS model. Use when you need to convert text to audio files with various voice options. Supports Chinese text synthesis with multiple voice personas, speed control, and output formats.
feishu-file
飞书文件发送技能。支持发送各类文件到飞书聊天,包括文档、图片、压缩包等,自动识别文件类型并处理上传。
clawhub-manager
ClawHub 技能管理工具。封装技能的发布、删除、查询和搜索功能,方便管理 ClawHub 上的技能。
feishu-voice
飞书语音消息发送技能。将文本转换为语音并发送到飞书,支持 TTS 生成、格式转换、时长读取、文件上传和消息发送。
zhipu-asr
Automatic Speech Recognition (ASR) using Zhipu AI (BigModel) GLM-ASR model. Use when you need to transcribe audio files to text. Supports Chinese audio transcription with context prompts, custom hotwords, and multiple audio formats.