md2pdf

Convert Markdown documents into publication-ready PDFs with Mermaid diagrams and multilingual text.

77|13|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/KerberosClaw/kc_ai_skills --skill md2pdf-kerberosclaw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: md2pdf
Source: https://github.com/KerberosClaw/kc_ai_skills/tree/main/md2pdf
Command: npx skills add https://github.com/KerberosClaw/kc_ai_skills --skill md2pdf-kerberosclaw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Converts Markdown documents into publication-ready PDFs, handling ASCII-to-Mermaid conversion, CJK font fallbacks, and self-check loops to fix rendering issues.

Core Features & Use Cases

  • Automatic ASCII-art to Mermaid conversion
  • PNG-based Mermaid rendering to avoid font issues
  • Robust CSS font fallbacks for multilingual text
  • Self-check pass with up to three retries and user prompts
  • CLI-friendly frontmatter-driven configuration
  • Works with pandoc, mermaid-cli, and weasyprint to produce consistent PDFs

Quick Start

Provide the Markdown file to be converted and request a publication-ready PDF.

Frequently Asked Questions about md2pdf

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

FAQPage Schema
How do I convert Markdown to PDF with Mermaid diagrams?

It converts Markdown to PDF by automatically rendering Mermaid diagrams into PNG images via mermaid-cli, then using pandoc and weasyprint to produce a publication-ready document without font rendering issues.

What is the best way to handle multilingual text when converting Markdown to PDF?

The best way to handle multilingual text in Markdown to PDF conversion is using robust CSS font fallbacks, specifically configuring CJK font rendering to ensure cross-language documentation displays correctly.

Can I use YAML frontmatter to configure PDF generation from Markdown?

Yes, you can use YAML frontmatter to configure PDF generation, as this Skill implements a CLI-friendly, frontmatter-driven configuration to manage settings for reproducible documentation workflows.

Does Markdown to PDF conversion support automatic ASCII-art to Mermaid conversion?

Yes, Markdown to PDF conversion supports automatic ASCII-art to Mermaid conversion, transforming plain text diagrams into properly rendered PNG visual elements within the final PDF document.

Why does my Markdown to PDF rendering fail and can it be fixed automatically?

Markdown to PDF rendering failures from font or diagram issues are handled by a self-check loop with up to three retries that detects and automatically fixes rendering problems before output.

Do I need pandoc and weasyprint to generate reproducible PDFs from Markdown?

Yes, you need pandoc and weasyprint to generate reproducible PDFs from Markdown, as this Skill integrates these tools to ensure consistent output for technical manuals and design documentation.