md2pdf

Solid

Convert a Markdown file to PDF with GitHub-style formatting using the md2pdf tool.

Data & Documents 421 stars 49 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
52
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Markdown to PDF Convert Markdown files to PDF with GitHub-style formatting using the `md2pdf` tool. ## Command Options - `$ARGUMENTS`: File paths or glob patterns to convert (e.g., `docs/guide.md`, `docs/*.md`) - `-o FILE`: Custom output path (only valid with a single input file) ## Your task 1. **Determine input files**: - If `$ARGUMENTS` are provided, use them as the file paths - If no arguments are provided, ask the user which files to convert 2. **Run the conversion**: Execute `md2pdf` with the specified files 3. **Report results**: Confirm which PDFs were generated ## Tool Details The `md2pdf` tool uses pandoc + weasyprint with GitHub-style CSS. The CSS and script live in dotfiles (`~/dotfiles/bin/.local/bin/`). The `MD2PDF_CSS` environment variable can override the default CSS path. ## Example Usage ```bash # Convert a single file /md2pdf docs/guide.md # Convert multiple files with a glob /md2pdf docs/qa-handoffs/qa-guide-*.md # Convert with a custom output name /md2pdf -o custom-name.pdf docs/guide.md ```

Details

Author
joshukraine
Repository
joshukraine/dotfiles
Created
12 years ago
Last Updated
today
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Featured

md2pdf

Use when the user wants to convert one Markdown file into a publication-ready A4 PDF, especially when the source may contain Mermaid diagrams, ASCII diagrams, CJK text, tables, or pandoc/weasyprint edge cases. Works by copying the source to a _pdf.md working file, converting diagrams, escaping PDF-breaking syntax, rendering with pandoc + weasyprint, then self-checking pages. NOT for batch conversion, slide decks, or editing the original Markdown in place.

76 Updated 5 days ago
KerberosClaw
Data & Documents Listed

md-to-pdf

Convert Markdown to PDF via reportlab or weasyprint engines. Triggers - pdf, md to pdf, markdown to pdf, generate pdf.

29 Updated 3 days ago
kochetkov-ma
Data & Documents Listed

markdown-to-pdf

Convert Markdown (.md) files to a polished PDF with ALL images preserved and scaled to the page. Use whenever the user asks to "save this markdown as a PDF", "convert README.md to pdf", "export the .md as a pdf", "turn these notes/docs into a PDF", or wants a PDF deliverable of any GitHub-flavored Markdown document (README, design doc, report, notes) — especially when it contains images or diagrams (remote or local), tables, code blocks, or a linked table of contents. Pipeline: pandoc (GFM → standalone HTML with embedded resources) → headless Chrome print-to-pdf with a GitHub-like print stylesheet → pypdf verification that every referenced image is embedded. Do NOT use for .tex → PDF (use a LaTeX toolchain) or for .docx work (use word-docx / tex2docx).

1 Updated 4 days ago
kennethkhoocy