AGENT SKILL

md-to-pdf

Use this skill when the user wants to convert Markdown files to PDF.

License 许可
MIT
所属仓库
javimosch/supercli
最近更新
2026-11-02
Stars
★ 57
Forks
5

01 前言 Front Matter

name
md-to-pdf
description
Use this skill when the user wants to convert Markdown files to PDF.

03 SKILL.md 正文

MD-to-PDF Plugin

Hackable CLI tool for converting Markdown files to PDF using Node.js and headless Chrome.

Commands

File Conversion

  • md-to-pdf file convert — Convert Markdown to PDF

Usage Examples

Installation

npm install -g md-to-pdf

Examples

# Convert markdown to PDF
md-to-pdf document.md

# Specify output file
md-to-pdf document.md --output doc.pdf

# Use custom stylesheet
md-to-pdf document.md --stylesheet styles.css

# Add inline CSS
md-to-pdf document.md --css 'body { font-size: 12pt; }'

# Set PDF options
md-to-pdf document.md --pdf-options '{"format": "A4", "margin": {"top": "1cm"}}'

# Convert multiple files with glob
md-to-pdf ./**/*.md

# Pipe markdown from stdin
cat document.md | md-to-pdf > output.pdf

# Watch mode for live updates
md-to-pdf document.md --watch

# Output as HTML instead
md-to-pdf document.md --as-html

Key Features

  • Markdown to PDF conversion
  • Custom stylesheets
  • Inline CSS support
  • Code highlighting (highlight.js)
  • Custom PDF options
  • Watch mode
  • Glob pattern support
  • HTML output option
  • Stdin/stdout support

04 同仓库更多 Skills