md2pdf: Markdown to PDF Conversion for Openclaw

A professional Markdown to PDF converter featuring perfect Chinese support, syntax highlighting, and customizable styling for high-quality document generation.

franklu0819-lang
v2.0.0
Feb 21, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install markdown-to-pdf-weasyprint

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install markdown-to-pdf-weasyprint using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is md2pdf: Markdown to PDF Conversion?

The md2pdf tool is a powerful utility within the Openclaw Skills ecosystem designed to bridge the gap between technical documentation and professional presentation. It offers a streamlined way to convert Markdown files into beautifully formatted PDF documents, specifically optimized for developers and technical writers who require high-fidelity output without the complexity of traditional typesetting systems.

By leveraging the WeasyPrint engine, this skill provides a lightweight alternative to LaTeX-heavy workflows. It excels at handling multi-language support—particularly Chinese characters via Noto Sans CJK—while maintaining sophisticated aesthetics through built-in dark themes for code blocks and zebra-striped tables. Whether you are generating reports, manuals, or project documentation, this addition to your Openclaw Skills library ensures consistent, high-quality results across Linux, macOS, and Windows environments.

md2pdf: Markdown to PDF Conversion Use Cases

  • Converting technical README files into professional project documentation for clients or stakeholders.
  • Automating the generation of PDF reports from Markdown-based data logs and analysis.
  • Creating beautifully formatted e-books or manuals that require reliable Chinese character rendering and syntax highlighting.
  • Generating print-ready versions of internal wiki pages or research notes directly from the CLI.

How md2pdf: Markdown to PDF Conversion Works

  1. The user provides a Markdown file as input to the conversion script via the Openclaw Skills workspace.
  2. The system parses the Markdown content using Python-based libraries, supporting extensions like tables, fenced code blocks, and smart lists.
  3. An integrated CSS stylesheet is applied to the converted HTML structure to define typography, color schemes, and layout spacing.
  4. The WeasyPrint engine renders the styled content into a high-quality PDF document, automatically embedding necessary fonts and handling page breaks.
  5. The final PDF is output to the specified directory, ready for distribution or printing.

md2pdf: Markdown to PDF Conversion Setup

To get started with this skill, ensure your environment is prepared by following these steps:

# Install essential Python dependencies
python3 -m pip install markdown weasyprint

# Install Chinese fonts for proper rendering (example for CentOS/RHEL)
yum install -y google-noto-sans-cjk-fonts

# Run the recommended conversion script from your workspace
bash /root/.openclaw/workspace/skills/md2pdf/scripts/convert-weasyprint.sh input.md

md2pdf: Markdown to PDF Conversion Data Schema & Taxonomy

The md2pdf skill organizes its conversion logic and output metadata as follows:

Component Description
Input Source Standard .md files using GFM or extended Markdown syntax.
Style Engine CSS-based styling integrated within the Python conversion scripts.
Font Assets Defaults to Noto Sans CJK SC for comprehensive multi-language support.
Output Format PDF/A compatible documents with embedded assets and metadata.
Dependencies Managed via python3-pip and system-level font packages.

md2pdf: Markdown to PDF Conversion Advanced Features

  • Automated dependency detection that identifies and installs missing Python modules or fonts on the first execution.
  • Customizable CSS templates allowing power users to modify headers, footers, and primary branding colors to match corporate styles.
  • Support for batch processing, enabling the parallel conversion of entire directories of Markdown files using GNU parallel.
  • Hybrid engine support offering a choice between WeasyPrint for simplicity and Pandoc for advanced LaTeX-based typesetting requirements.
  • Dark mode syntax highlighting for code blocks using specialized CSS themes for enhanced readability.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*