any2pdf

Installation
SKILL.md

any2pdf — Markdown to Professionally Typeset PDF

Credits. This skill is adapted from lovstudio/any2pdf by lovstudio, distributed under the MIT license. The original repository ships the Python implementation (md2pdf.py), preview gallery, and reference theme JSONs. This document is the Mercury-compatible SKILL.md adaptation; the runtime code and design credit belong entirely to the original author.

This skill converts any Markdown file into a publication-quality PDF using Python's reportlab. It was developed through extensive iteration on real Chinese technical reports and solves several hard problems that naive MD→PDF converters get wrong — CJK/Latin mixed text wrapping, canvas CJK rendering on cover/headers/footers, code-block whitespace preservation, and mixed-font fallbacks across macOS, Linux, and Windows.


When to Use

Trigger this skill whenever the user:

Installs
7
GitHub Stars
464
First Seen
May 30, 2026
any2pdf — cosmicstack-labs/mercury-agent-skills