convert-md-to-pdf

Convert Markdown files with Mermaid diagrams into styled PDFs.

19|5|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/digital-stoic-org/agent-skills --skill convert-md-to-pdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convert-md-to-pdf
Source: https://github.com/digital-stoic-org/agent-skills/tree/main/dstoic/skills/convert-md-to-pdf
Command: npx skills add https://github.com/digital-stoic-org/agent-skills --skill convert-md-to-pdf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markdown, pygments, weasyprint, and includes scripts (resource) components.

What problem does it solve?

Converting Markdown documents that include Mermaid diagrams into printable, professionally styled PDFs, automating the diagram rendering and typography to streamline documentation workflows.

Core Features & Use Cases

  • Mermaid diagram rendering into PDF frames to preserve diagrams in documents.
  • Multiple CSS themes (default, modern, minimal, report) for consistent formatting.
  • Local, safe processing with isolated temp storage and headless rendering, suitable for project docs and reports.

Quick Start

Convert input.md to output.pdf using the default style.

Frequently Asked Questions about convert-md-to-pdf

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

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

To convert Markdown with Mermaid diagrams into PDF, this Skill renders the diagrams into PDF frames and applies CSS typography. It uses Python libraries like markdown, pygments, and WeasyPrint to automate the transformation for print-ready documentation.

How does Mermaid diagram rendering work when converting Markdown to PDF?

Mermaid diagram rendering in PDF conversion works by processing the Markdown text and embedding the diagrams directly into PDF frames. This preserves the visual structure of flowcharts and graphs alongside the document's text formatting.

Can I use different CSS themes for Markdown to PDF conversion?

You can apply multiple CSS themes for Markdown to PDF conversion, including default, modern, minimal, and report styles. These themes ensure consistent formatting and professional typography across your generated PDF documents.

Do I need Python libraries like WeasyPrint to generate PDFs from Markdown?

You need Python libraries like WeasyPrint, markdown, and pygments to generate styled PDFs from Markdown. WeasyPrint handles the PDF generation, while markdown and pygments process the text and code syntax highlighting.

What is the best way to automate documentation workflows for project reports?

The best way to automate documentation workflows for project reports is using a conversion process that renders Markdown and Mermaid diagrams into styled PDFs. This approach isolates temporary storage and uses headless rendering for safe, local processing.

Are there limitations when processing Markdown to PDF locally?

Limitations of local Markdown to PDF processing include potential system temporary directory conflicts, which this Skill avoids by using isolated local temporary storage. It also requires a headless rendering environment for proper Mermaid diagram generation.