Markdown to PDF Converter for Openclaw

A CLI-based utility to convert Markdown files into high-quality, styled PDF documents using Pandoc and wkhtmltopdf.

mengwuzhi
v1.0.0
Feb 28, 2026
0
1.5k
0

Install & Download

1. ClawHub CLI

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

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

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-styled 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 provides a seamless bridge between lightweight Markdown documentation and professional PDF distribution. By leveraging the industry-standard Pandoc engine and wkhtmltopdf renderer, it allows developers and technical writers to generate polished documents without leaving the command line. This utility is a core part of the Openclaw Skills ecosystem designed for streamlined documentation workflows.

Whether you need a clean business report or a modern presentation-style document, this skill handles the heavy lifting of CSS styling and PDF rendering. It supports multiple built-in themes and offers the flexibility to inject custom CSS for complete branding control, ensuring that your technical output remains consistent and professional.

Markdown to PDF Converter Use Cases

  • Generating professional reports from project README files.
  • Automating documentation exports in CI/CD pipelines using Openclaw Skills.
  • Creating styled whitepapers or technical guides from simple text files.
  • Standardizing document formatting across a team with preset CSS themes.

How Markdown to PDF Converter Works

  1. The script receives an absolute path to a Markdown (.md) file as the primary input.
  2. It verifies the presence of system dependencies, specifically Pandoc and wkhtmltopdf.
  3. The skill identifies the selected style flag (clean, modern, paper, or a custom CSS path).
  4. Pandoc processes the Markdown content and any associated YAML metadata (like document titles).
  5. wkhtmltopdf renders the content into a final PDF, applying the chosen CSS and enabling local file access for assets.

Markdown to PDF Converter Setup

Ensure you have the required dependencies installed on your system before utilizing this component of Openclaw Skills:

# Example for Debian/Ubuntu
sudo apt-get install pandoc wkhtmltopdf

Verify the installation:

pandoc --version
wkhtmltopdf --version

To execute a conversion, use the provided shell script:

bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md

Markdown to PDF Converter Data Schema & Taxonomy

The skill operates on standard file system paths and utilizes Markdown metadata for document properties. It organizes output based on the following structure:

Component Type Description
Source File .md The input Markdown document to be converted.
Output File .pdf The generated PDF document, saved to the specified path.
Styles CSS/Preset Predefined themes (clean, modern, paper) or external CSS files.
Metadata YAML Uses the 'title:' key in Markdown to set the PDF title attribute.

Markdown to PDF Converter Advanced Features

  • Custom CSS Injection: Pass an absolute path to any CSS file to override default styling for full brand alignment.
  • Local Asset Support: Automatically enables --enable-local-file-access to ensure images and local resources are rendered correctly in the PDF.
  • Flexible Output Naming: Specify custom output paths and filenames directly via the CLI arguments within Openclaw Skills.
  • Metadata Integration: Support for Markdown front matter to define document titles and metadata properties during the conversion process.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*