Pandoc Document Converter for Openclaw

A versatile document conversion skill that leverages Pandoc to transform files between dozens of formats including PDF, HTML, Word, and EPUB.

oliver-hrkltz
v1.0.2
Mar 16, 2026
2
2.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install pandoc

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 pandoc 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 Pandoc Document Converter?

The Pandoc Document Converter is a robust integration for Openclaw Skills that enables seamless transformation of documents across a vast array of formats. By utilizing Pandoc's internal Abstract Syntax Tree (AST), this skill allows users to convert content from nearly any source—such as Markdown, LaTeX, or DOCX—into professional-grade outputs like PDF, EPUB, or HTML.

Beyond simple format switching, this skill provides deep control over document appearance. It supports custom CSS for web-based outputs, LaTeX templates for high-quality typesetting, and reference documents to maintain consistent branding in Office formats. Whether you are generating reports, publishing e-books, or extracting content from legacy files, this tool provides a programmatic and highly customizable approach to document management.

Pandoc Document Converter Use Cases

  • Converting Markdown documentation into professional PDF reports with custom margins and fonts.
  • Transforming HTML web content into clean, readable Word documents for offline editing.
  • Generating EPUB e-books from structured Markdown or LaTeX source files.
  • Automating the extraction of media and images from DOCX or EPUB files into local directories.
  • Creating HTML tables and structured web content directly from CSV data files.

How Pandoc Document Converter Works

  1. The skill identifies the source file format, either through auto-detection of the extension or explicit user definition.
  2. It processes the input into an internal AST (Abstract Syntax Tree), ensuring data integrity across different markup languages.
  3. The user selects a target output format and, if generating a PDF, chooses a specific engine like xelatex or weasyprint.
  4. Optional styling layers are applied, such as CSS stylesheets, LaTeX variables, or YAML metadata for headers and footers.
  5. The final document is rendered and saved to the specified output path with all assets correctly linked or embedded.

Pandoc Document Converter Setup

To use this skill within Openclaw Skills, ensure you have Pandoc installed on your system. For PDF generation, a TeX engine or HTML-to-PDF converter is required.

# Install Pandoc (Example for Ubuntu/Debian)
sudo apt-get install pandoc

# Optional: Install XeLaTeX for high-quality PDF output
sudo apt-get install texlive-xetex

# Basic conversion usage via the helper script
bash scripts/convert.sh input.md output.pdf --pdf-engine=xelatex

Pandoc Document Converter Data Schema & Taxonomy

The skill manages document metadata and assets through the following structure:

Feature Method Description
Metadata YAML Frontmatter Define title, author, and date at the top of source files.
Styling CSS / LaTeX Vars Use assets/default.css for HTML or -V variables for PDF geometry.
Templates Reference Docs Utilize .docx or .odt files as templates for layout and branding.
Media --extract-media Automatically creates a media folder for images extracted from binaries.

Pandoc Document Converter Advanced Features

  • Multi-file concatenation to merge several chapters into a single comprehensive book or report.
  • Lua filter support for complex document transformations and custom AST manipulations.
  • Self-contained HTML generation that embeds images as base64 strings for easy sharing.
  • Granular PDF engine selection to optimize for Unicode support (XeLaTeX) or CSS-based layout (WeasyPrint).
  • Automated Table of Contents (TOC) generation with configurable depth for long-form documents.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*