md2pdf

Convert Markdown files to PDF documents using pandoc.

Updated Oct 7, 2025
One-click install
npx skills add https://github.com/stanleyhsu/hello-mcp --skill md2pdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: md2pdf
Source: https://github.com/stanleyhsu/hello-mcp/tree/main/.claude/skills/md2pdf
Command: npx skills add https://github.com/stanleyhsu/hello-mcp --skill md2pdf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually converting Markdown files to professionally formatted PDFs can be a tedious and error-prone process, often requiring specific tools and command-line expertise. This Skill eliminates that complexity, automating the conversion to deliver polished PDF documents without the hassle.

Core Features & Use Cases

  • Effortless Conversion: Transform any Markdown file into a high-quality PDF with a simple command.
  • Advanced Formatting Options: Apply custom page margins, font sizes, syntax highlighting for code blocks, and automatically generate tables of contents.
  • Dependency Guidance: Provides clear instructions for installing necessary tools like Pandoc and LaTeX, ensuring a smooth setup experience.
  • Use Case: Quickly generate professional reports, technical documentation, or e-books from your Markdown source files, ready for sharing, printing, or archival, all while maintaining consistent, high-quality formatting.

Quick Start

Convert a basic markdown file to PDF

pandoc input.md -o output.pdf

Convert with a table of contents and custom margins

pandoc document.md -o document.pdf --toc -V geometry:margin=1in

Frequently Asked Questions about md2pdf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Markdown files to PDF?

Convert Markdown to PDF using pandoc, which transforms your Markdown source into professionally formatted PDF documents. The Skill executes pandoc with formatting options, verifies tool availability, and outputs the PDF file path for immediate use.

Can I add a table of contents and custom formatting when converting Markdown to PDF?

Yes, the Skill applies advanced formatting options including table of contents generation, custom page margins, font sizes, and syntax highlighting for code blocks during Markdown-to-PDF conversion.

What do I need installed to convert Markdown to PDF?

You need pandoc and a PDF engine such as LaTeX installed on your system. The Skill verifies pandoc availability and checks for a compatible PDF engine before executing the conversion.

Can I batch convert multiple Markdown files to PDF?

Yes, the Skill handles both single-file and batch Markdown-to-PDF conversions, making it suitable for generating multiple PDFs from documentation, READMEs, guides, or reports in one operation.

What's the best way to generate professional PDF reports from Markdown documentation?

Use Markdown-to-PDF conversion to transform documentation source files into polished, shareable PDFs with consistent formatting. This approach maintains high-quality output suitable for printing, archival, or distribution without manual formatting work.