any2pdf

Convert Markdown files into themed PDF documents with CJK-safe rendering.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill any2pdf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: any2pdf
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/pdf-generation/any2pdf
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill any2pdf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires reportlab, matplotlib.

What problem does it solve?

This skill turns raw Markdown into publication-quality, themeable PDFs while preserving the details that typical converters often break, especially for CJK/Latin mixed text and code formatting.

Core Features & Use Cases

  • Professional Markdown → PDF typesetting: produces a cover, table of contents, styled typography, and consistent layout for reports and documents.
  • CJK/Latin mixed rendering fixes: handles CJK characters correctly in both flow text and canvas header/footer elements.
  • Rich document fidelity: preserves fenced code formatting, supports markdown images, Obsidian-style callouts, and LaTeX-style formulas (with optional rendering).

Quick Start

Run any2pdf to convert your Markdown file into a themed PDF by executing the script with the input Markdown path and an output PDF path.

Frequently Asked Questions about any2pdf

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

FAQPage Schema
How do I convert Markdown to PDF with correct CJK and Latin mixed text formatting?

To convert Markdown to PDF with correct CJK and Latin formatting, you need a rendering pipeline that applies CJK-safe font wrapping to both flow text and canvas headers. This ensures multilingual characters render properly without breaking layout.

What is the best way to generate a themed PDF report from Markdown files?

The best way to generate a themed PDF report from Markdown is using a reportlab-based rendering pipeline that produces a cover page, table of contents, and styled typography for publication-quality document publishing.

Does reportlab support preserving fenced code whitespace and Obsidian-style callouts in PDF generation?

Yes, reportlab supports preserving fenced code whitespace and Obsidian-style callouts during PDF generation when configured with a specialized rendering pipeline that maintains rich document fidelity for these specific Markdown elements.

Can I render LaTeX-style formulas and markdown images when converting Markdown to PDF?

You can render LaTeX-style formulas and markdown images when converting Markdown to PDF by using a tool that includes optional formula and image handling within its document conversion pipeline.

Why does my Markdown to PDF converter break code block formatting?

Your Markdown to PDF converter breaks code block formatting because it lacks proper code whitespace preservation logic. You need a rendering pipeline specifically designed to maintain fenced code formatting fidelity.

Do I need matplotlib to convert Markdown to a publication-quality PDF?

You need matplotlib alongside reportlab to convert Markdown to a publication-quality PDF, as these dependencies support the rendering pipeline required for accurate typography, layouts, and visual fidelity.