🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

md-2-pdf

by @araa47

Convert markdown files to clean, formatted PDFs using reportlab

Versionv1.0.0
Downloads3,052
TERMINAL
clawhub install md-2-pdf

πŸ“– About This Skill


name: md-to-pdf description: Convert markdown files to clean, formatted PDFs using reportlab metadata: {"openclaw":{"emoji":"πŸ“„","requires":{"bins":["uv"]}}}

Markdown to PDF

Convert markdown documents to professional, clean PDFs with proper formatting.

Usage

# Basic usage
uv run scripts/md-to-pdf.py input.md

Specify output

uv run scripts/md-to-pdf.py input.md -o output.pdf uv run scripts/md-to-pdf.py input.md --output my-report.pdf

Verbose mode

uv run scripts/md-to-pdf.py input.md -v

Features

  • Headers: H1-H6 with hierarchical styling
  • Text formatting: Bold, italic, inline code
  • Lists: Bullet lists, numbered lists, task lists
  • Code blocks: Syntax highlighting with background
  • Tables: Full table support with headers
  • Links: Clickable hyperlinks
  • Horizontal rules: Visual section dividers
  • YAML frontmatter: Automatically skipped
  • Special characters: Emojis, Unicode symbols
  • Page numbers: Automatic footer with page numbers
  • Professional styling: Clean, readable output
  • Options

  • -o, --output: Output PDF file path (default: input_filename.pdf)
  • -v, --verbose: Print detailed processing information
  • Supported Markdown Elements

    | Element | Syntax | Status | |---------|--------|--------| | Headers | # H1 to ###### H6 | βœ… | | Bold | text or __text__ | βœ… | | Italic | *text* or _text_ | βœ… | | Inline code | ` code | βœ… | | Code blocks | ` | βœ… | | Bullet lists | - item or * item | βœ… | | Numbered lists | 1. item | βœ… | | Task lists | - [x] done | βœ… | | Tables | | col | col | | βœ… | | Links | text | βœ… | | Horizontal rules | --- or *** | βœ… | | Blockquotes | > quote` | βœ… |

    πŸ’‘ Examples

    # Basic usage
    uv run scripts/md-to-pdf.py input.md

    Specify output

    uv run scripts/md-to-pdf.py input.md -o output.pdf uv run scripts/md-to-pdf.py input.md --output my-report.pdf

    Verbose mode

    uv run scripts/md-to-pdf.py input.md -v

    βš™οΈ Configuration

  • -o, --output: Output PDF file path (default: input_filename.pdf)
  • -v, --verbose: Print detailed processing information