| name | md-to-pdf |
| description | Use this skill when the user wants to convert Markdown files to PDF. |
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
- "md-to-pdf file convert --input document.md"
- "md-to-pdf file convert --input document.md --output doc.pdf"
Installation
npm install -g md-to-pdf
Examples
md-to-pdf document.md
md-to-pdf document.md --output doc.pdf
md-to-pdf document.md --stylesheet styles.css
md-to-pdf document.md --css 'body { font-size: 12pt; }'
md-to-pdf document.md --pdf-options '{"format": "A4", "margin": {"top": "1cm"}}'
md-to-pdf ./**/*.md
cat document.md | md-to-pdf > output.pdf
md-to-pdf document.md --watch
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