Markdown to PDF (md-to-pdf) for Openclaw

A streamlined utility to transform markdown files into professional, high-quality PDF documents using reportlab.

araa47
v1.0.0
Feb 2, 2026
0
2.9k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install md-2-pdf

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 md-2-pdf 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 (md-to-pdf)?

The md-to-pdf skill provides a robust bridge between lightweight markdown authoring and professional document distribution. By leveraging reportlab, it transforms standard markdown syntax into cleanly formatted PDFs, making it a valuable asset within the ecosystem of Openclaw Skills.

This tool is designed for developers and technical writers who prefer writing in markdown but require portable, read-only formats for sharing reports, documentation, or project summaries. It handles complex elements like tables, task lists, and syntax-highlighted code blocks with ease, ensuring your technical content looks polished in every format.

Markdown to PDF (md-to-pdf) Use Cases

  • Converting project READMEs into printable documentation.
  • Generating professional reports from automated analysis logs stored in markdown.
  • Sharing clean, formatted project specifications with non-technical stakeholders.
  • Archiving markdown-based notes as standardized PDF files for long-term storage within Openclaw Skills workflows.

How Markdown to PDF (md-to-pdf) Works

  1. The user provides a markdown file path as input to the script via the CLI.
  2. The script parses the markdown content, identifying structural elements like headers, lists, and tables.
  3. YAML frontmatter is automatically detected and skipped to ensure clean output without metadata clutter.
  4. The script uses reportlab to map markdown styles to PDF primitives, including page numbering and horizontal rules.
  5. A final PDF file is generated at the specified destination or a default path derived from the input filename.

Markdown to PDF (md-to-pdf) Setup

Ensure you have the uv package manager installed to execute the skill efficiently. No complex environment setup is required as dependencies are handled at runtime.

# Basic usage to convert a file
uv run scripts/md-to-pdf.py your-document.md

# Output to a specific file name
uv run scripts/md-to-pdf.py your-document.md -o custom-report.pdf

# Enable verbose mode for debugging
uv run scripts/md-to-pdf.py your-document.md --verbose

Markdown to PDF (md-to-pdf) Data Schema & Taxonomy

The skill interprets markdown syntax and maps it to a structured PDF layout. The following table describes how elements are handled within the Openclaw Skills framework:

Component Description
Input .md file with standard or GFM syntax
Metadata Automatic skipping of YAML frontmatter blocks
Layout Header/Footer integration with automated page numbering
Elements Support for headers (H1-H6), tables, and task lists

Markdown to PDF (md-to-pdf) Advanced Features

  • Syntax Highlighting: Code blocks are rendered with a distinct background for better readability.
  • Task List Support: Handles checkbox syntax, perfect for checklist exports.
  • Unicode & Emoji Support: Renders special characters and symbols accurately within the generated PDF.
  • Automatic Footer: Integrated page numbering for multi-page document management in Openclaw Skills.
  • Flexible CLI: Supports custom output paths and verbose logging for integration into automated pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins uv
Github Stars: 0
forks: 0

Featured*