Skip to content
Back to search

any2pdf

Markdown to professionally typeset PDF — an agent skill for AI coding assistants

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lovstudio--any2pdf/badge.svg)](/listings/lovstudio--any2pdf)

HTML

<a href="/listings/lovstudio--any2pdf"><img src="/api/listings/lovstudio--any2pdf/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add skill-publisher/any2pdf -g -y

Works with 25+ AI agents: Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, Cline, Warp, and more.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 182 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # any2pdf
  2. **Tell your AI assistant "转PDF" and get a publication-quality document.** No config, no templates, no LaTeX.
  3. An [agent skill](https://agentskills.io) that gives AI coding assistants (Claude Code, Cursor, Copilot, Gemini CLI, etc.) the ability to convert Markdown into professionally typeset PDFs — with a single natural language request.
  4. ## Why This Exists
  5. Every existing Markdown-to-PDF tool falls into one of two traps:
  6. 1. **Too simple** — Pandoc/wkhtmltopdf produce passable output for English, but CJK mixed text gets butchered: wrong fonts, broken line wraps, "Claude Code" split across lines, 年月日 rendered as □□□.
  7. 2. **Too complex** — LaTeX produces beautiful output but requires a 4GB TeX distribution, arcane syntax, and breaks on every CJK edge case. No AI assistant can reliably drive it.
  8. **any2pdf** is the sweet spot: one Python file, one dependency (`reportlab`), zero config — and it handles every CJK/Latin edge case because we hit them all building real 200-page Chinese technical reports.
  9. ## What Makes It Different
  10. ### For AI Agents — Zero-Friction Workflow
  11. The skill teaches your AI assistant an **interactive workflow**, not just a CLI command:
  12. ```
  13. You: "把这个报告转成PDF"
  14. Agent: asks about design style, frontispiece, watermark, back cover
  15. Agent: runs the conversion with all your choices
  16. ```
  17. One sentence from you → a complete, branded document.
  18. ### For CJK Users — Battle-Tested on Real Reports
  19. Every fix in this codebase came from a real rendering bug in a real report:
  20. - **Mixed text wrapping**: "Chaofan Shou" won't split across lines; Chinese text breaks naturally at character boundaries
  21. - **Canvas CJK**: Dates like "2026年4月1日" render correctly everywhere — cover, headers, footers
  22. - **Book-quality fonts**: Palatino + 宋体 (macOS), Times + SimSun (Windows) — not Arial + fallback
  23. - **Rich Markdown blocks**: Obsidian callouts, inline images, emoji, and LaTeX-style formulas render instead of disappearing
  24. - **Merged heading recovery**: Input like `# Part## Chapter` on one line? Auto-split before parsing
  25. ### For Everyone — Cross-Platform, Zero Config
  26. | | macOS | Windows | Linux |
  27. |---|---|---|---|
  28. | Serif | Palatino | Times New Roman | Liberation/Noto Serif |
  29. | CJK | Songti SC (宋体) | SimSun/微软雅黑 | Noto CJK |
  30. | Mono | Menlo | Consolas | DejaVu Mono |
  31. | Setup | `pip install reportlab` | `pip install reportlab` | `pip install reportlab` |
  32. Fonts are auto-discovered from system paths. Missing fonts? You get a helpful error with the exact install command for your OS.
  33. On Ubuntu/Debian, the broadest setup is:
  34. ```bash
  35. sudo apt install fonts-dejavu-core fonts-liberation fonts-freefont-ttf fonts-noto fonts-noto-cjk fonts-noto-color-emoji
  36. ```
  37. ## Install
  38. ```bash
  39. npx skills add skill-publisher/any2pdf -g -y
  40. ```
  41. Works with 25+ AI agents: Claude Code, Cursor, GitHub Copilot, Gemini CLI, Codex, Cline, Warp, and more.
  42. ## Design Styles
  43. 10 built-in themes — from classic LaTeX-inspired to modern minimalist. Click to preview.
  44. <table>
  45. <tr>
  46. <td align="center" width="33%">
  47. <strong>Configurable Academic</strong><br>
  48. <sub>陶土色调,温润典雅</sub><br>
  49. <img src="previews/warm-academic.png" width="260">
  50. </td>
  51. <td align="center" width="33%">
  52. <strong>Classic Thesis</strong><br>
  53. <sub>LaTeX classicthesis 风格</sub><br>
  54. <img src="previews/classic-thesis.png" width="260">
  55. </td>
  56. <td align="center" width="33%">
  57. <strong>Tufte</strong><br>
  58. <sub>极简留白,深红点缀</sub><br>
  59. <img src="previews/tufte.png" width="260">
  60. </td>
  61. </tr>
  62. <tr>
  63. <td align="center">
  64. <strong>IEEE Journal</strong><br>
  65. <sub>藏蓝严谨,期刊风格</sub><br>
  66. <img src="previews/ieee-journal.png" width="260">
  67. </td>
  68. <td align="center">
  69. <strong>Elegant Book</strong><br>
  70. <sub>LaTeX ElegantBook 风格</sub><br>
  71. <img src="previews/elegant-book.png" width="260">
  72. </td>
  73. <td align="center">
  74. <strong>Chinese Red</strong><br>
  75. <sub>朱红配暖纸,中式正式</sub><br>
  76. <img src="previews/chinese-red.png" width="260">
  77. </td>
  78. </tr>
  79. <tr>
  80. <td align="center">
  81. <strong>Ink Wash</strong><br>
  82. <sub>水墨风,纯灰黑素雅</sub><br>
  83. <img src="previews/ink-wash.png" width="260">
  84. </td>
  85. <td align="center">
  86. <strong>GitHub Light</strong><br>
  87. <sub>蓝白极简,开发者风格</sub><br>
  88. <img src="previews/github-light.png" width="260">
  89. </td>
  90. <td align="center">
  91. <strong>Nord Frost</strong><br>
  92. <sub>蓝灰北欧风,清爽现代</sub><br>
  93. <img src="previews/nord-frost.png" width="260">
  94. </td>
  95. </tr>
  96. <tr>
  97. <td align="center">
  98. <strong>Ocean Breeze</strong><br>
  99. <sub>青绿色调,清新自然</sub><br>
  100. <img src="previews/ocean-breeze.png" width="260">
  101. </td>
  102. <td align="center"></td>
  103. <td align="center"></td>
  104. </tr>
  105. </table>
  106. ## What You Get
  107. - **Cover page** with title, subtitle, author, version, stats lines
  108. - **Clickable table of contents** with PDF bookmark sidebar
  109. - **Frontispiece** — full-page image after cover (AI-generated or local)
  110. - **Running headers** — stable report/document title without page-lagged chapter labels
  111. - **Running footers** — author/brand, page number, date
  112. - **Watermark** — faint diagonal text on every content page
  113. - **Back cover** — banner image or text branding (QR codes, business cards)
  114. - **10 design themes** — from warm academic to ink wash minimalist
  115. - **Markdown images** — local and remote `![alt](src)` images with graceful fallback text
  116. - **Obsidian callouts** — `> [!NOTE]`, warnings, tips, quotes, and related callout types
  117. - **LaTeX-style formulas** — inline `$...$` and display `$$...$$` / `\[...\]`; install `matplotlib` for rendered math images
  118. - **Emoji fallback** — Twemoji image rendering when online, with local emoji-font fallback when available
  119. - **YAML frontmatter** — set title, theme, watermark, cover, TOC, and other options inside the Markdown file
  120. ## Direct CLI Usage
  121. You can keep document options in frontmatter so the source stays reproducible:
  122. ```markdown
  123. ---
  124. title: My Report
  125. author: Author Name
  126. theme: warm-academic
  127. watermark: DRAFT
  128. ---
  129. ```
  130. ```bash
  131. pip install reportlab
  132. # Optional, for rendered formula images instead of styled fallback text:
  133. pip install matplotlib
  134. python lov-any2pdf/scripts/md2pdf.py \
  135. --input report.md \
  136. --output report.pdf \
  137. --title "My Report" \
  138. --author "Author Name" \
  139. --theme warm-academic \
  140. --watermark "DRAFT" \
  141. --toc true
  142. ```
  143. See [SKILL.md](lov-any2pdf/SKILL.md) for the full 20+ argument reference.
  144. ## License
  145. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.