Markdown to PDF (Styled)

v1.0.0

Convert Markdown files to styled PDFs using pandoc and wkhtmltopdf with built-in or custom CSS style options.

0· 714· 1 versions· 4 current· 4 all-time· Updated 15h ago· MIT-0

Install

openclaw skills install markdown-to-pdf-styled

md-to-pdf

version: 1.0.0
author: 大总管
description: Convert Markdown (.md) files to styled PDF documents with pandoc + wkhtmltopdf

Use this skill to convert Markdown to PDF with consistent styles.

Quick Start

  1. Ensure dependencies exist:
pandoc --version
wkhtmltopdf --version
  1. Run conversion:
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md

Style Options

Use built-in styles:

  • clean (default): simple business style
  • modern: blue, presentation-friendly
  • paper: serif, reading-friendly

Examples:

bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md --style clean
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md /abs/path/out.pdf --style modern
bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md --style paper

Custom CSS

Pass an absolute CSS path:

bash {baseDir}/scripts/md2pdf.sh /abs/path/doc.md /abs/path/doc.pdf --style /abs/path/custom.css

Notes

  • Script enables local CSS loading via --enable-local-file-access.
  • If output title warning appears, set Markdown metadata title:.
  • For detailed usage and troubleshooting, read {baseDir}/references/usage.md.

Version tags

exportvk9748w3rdb8tejhb9cd30072vd820b9blatestvk9748w3rdb8tejhb9cd30072vd820b9bmarkdownvk9748w3rdb8tejhb9cd30072vd820b9bpandocvk9748w3rdb8tejhb9cd30072vd820b9bpdfvk9748w3rdb8tejhb9cd30072vd820b9bwkhtmltopdfvk9748w3rdb8tejhb9cd30072vd820b9b