Markdown to PDF Converter for Openclaw

An automated workflow skill that transforms Markdown reports into professional PDF documents for seamless sharing on platforms like WeChat and Feishu.

jingxxxxx
v1.0.0
Mar 23, 2026
0
631
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install wxmd2df

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 wxmd2df 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 Markdown to PDF Converter?

The md-to-pdf skill is a specialized automation tool designed for Openclaw Skills users who need to bridge the gap between technical documentation and client-facing communication. While Markdown is excellent for generation and versioning, many mobile messaging platforms lack native rendering for .md files. This skill ensures that every report generated by your AI agent is instantly accessible to end-users in a universally accepted format.

By leveraging the power of headless Chrome via the md-to-pdf engine, this skill produces high-quality A4 documents with standardized margins. It is particularly effective for teams using Openclaw Skills to automate reporting workflows where the final delivery happens on mobile-first platforms like WeChat or Feishu, providing a professional polish to every interaction.

Markdown to PDF Converter Use Cases

  • Sending automated reports via WeChat (openclaw-weixin) or Feishu where raw Markdown is not rendered.
  • Fulfilling explicit user requests for PDF versions of technical documentation or analysis.
  • Ensuring consistent document formatting across different operating systems and mobile devices.
  • Providing a fallback viewing option when the recipient's communication channel does not support file previews for text-based formats.

How Markdown to PDF Converter Works

  1. The agent detects the generation of a new .md report file.
  2. The system evaluates the delivery channel (e.g., WeChat and Feishu trigger conversion, while Discord and Telegram bypass it).
  3. The skill executes a CLI command using npx to convert the Markdown content into a PDF with predefined A4 specifications.
  4. It performs a validation check to ensure the generated PDF file is non-empty and located in the correct directory.
  5. The final PDF is transmitted to the user, optionally accompanied by a summary of the report's key conclusions.

Markdown to PDF Converter Setup

To use this skill within your Openclaw Skills environment, ensure you have Node.js installed. The skill will automatically handle the package installation on its first run. Use the following command structure for manual testing or configuration:

# Ensure homebrew binaries are in path and run conversion
export PATH="$HOME/.homebrew/bin:$PATH" && npx -y md-to-pdf@latest <input_file.md> --pdf-options '{"format":"A4","margin":{"top":"20mm","bottom":"20mm","left":"15mm","right":"15mm"}}'

Markdown to PDF Converter Data Schema & Taxonomy

The skill maintains a 1:1 mapping between source and output files to ensure simple data management within Openclaw Skills.

File Type Location Description
Source (.md) Working Directory The original Markdown report generated by the agent.
Output (.pdf) Working Directory The converted document sharing the same filename as the source.
Metadata Internal State Tracking of conversion success/failure for fallback logic.

Markdown to PDF Converter Advanced Features

  • Smart Channel Detection: Automatically decides whether to convert based on the target platform's rendering capabilities.
  • Automated Dependency Management: Uses npx to ensure the latest version of the conversion engine is used without manual global installs.
  • Intelligent Fallback Mechanism: If a conversion fails, the system automatically reverts to sending the raw Markdown file and notifies the user.
  • Customized Layout Engine: Support for A4 standard formatting with specific margin controls (20mm top/bottom, 15mm sides).

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*