Markdown to PDF
Converting Markdown to professional PDFs using Pandoc, WeasyPrint, ReportLab, and related tools
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill markdown-to-pdfgit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/pdf-generation/markdown-to-pdf ~/.claude/skills/markdown-to-pdfPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Markdown to PDF Conversion Convert Markdown documents into polished, production-ready PDFs. This skill covers the major toolchains — Pandoc, WeasyPrint, ReportLab — plus CSS print styling, template systems, and batch conversion workflows. --- ## Toolchain Overview | Tool | Approach | Best For | Output Quality | |------|----------|----------|----------------| | **Pandoc** | Markdown → PDF via LaTeX/Context/Wkhtmltopdf | Books, papers, reports | High | | **WeasyPrint** | Markdown → HTML → PDF via CSS print | Web-like documents, branded PDFs | High | | **ReportLab** | Programmatic PDF generation via Python | Dynamic, data-driven PDFs | Very High | | **md-to-pdf** | Node.js CLI for quick markdown → PDF | Simple documents, quick output | Medium | | **Puppeteer/Playwright** | Markdown → HTML → Headless browser → PDF | Pixel-perfect web-to-PDF | Very High | --- ## 1. Pandoc Workflows Pandoc is the Swiss Army knife of document conversion. It reads Markdown and outputs PDF via an intermediate engine (default: LaTeX). ### Basic Conversion ```bash # Simple markdown to PDF (uses pdflatex) pandoc input.md -o output.pdf # With metadata file pandoc input.md --metadata-file=metadata.yaml -o output.pdf # Specify output engine pandoc input.md --pdf-engine=xelatex -o output.pdf # Using wkhtmltopdf instead of LaTeX pandoc input.md --pdf-engine=wkhtmltopdf -o output.pdf ``` ### Advanced Pandoc with Templates
Details
- Skill name
markdown-to-pdf- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/pdf-generation/markdown-to-pdf/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Markdown to PDF skill do?
Converting Markdown to professional PDFs using Pandoc, WeasyPrint, ReportLab, and related tools
How do I install the Markdown to PDF skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill markdown-to-pdf. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Markdown to PDF popular?
It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Pitch Deck Creation
492cosmicstack-labs/mercury-agent-skills
Pitch Deck Creation: Investor pitch decks, Y Combinator applications, Product Hunt launches, and startup fundraising presentations
Invoice Document PDF
492cosmicstack-labs/mercury-agent-skills
Generating invoices, contracts, forms, receipts, and business documents as professional PDFs
Presentation Automation
492cosmicstack-labs/mercury-agent-skills
Presentation Automation: python-pptx, Google Slides API, automated slide generation from data and templates
Browse the most popular Claude skills, all documents & office files skills, or write your own with the skills generator.