跳到正文
TakoAPI
返回技能列表

md2pdf-converter

由 tianxingleo 提供

Git & GitHub
646下载量由 clawskills.sh 提供
2星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Offline Markdown to PDF converter with FULL Unicode support using Pandoc + WeasyPrint + local Twemoji cache (3660.

描述

该技能的功能

Converts Markdown documents to PDF with full Unicode support, CJK font rendering, and colorful emojis using Pandoc, WeasyPrint, and a local Twemoji 14.0.0 cache. Works offline after an initial ~150MB download on first run.

Most Markdown-to-PDF tools either drop CJK characters or render emojis as black-and-white glyphs; this combines Pandoc, WeasyPrint, and a locally cached Twemoji set to handle both correctly offline.

何时使用

  • Converting Markdown reports with Chinese or Japanese text to PDF
  • Exporting documents containing emojis as colorful PDFs
  • Generating technical docs with code blocks and tables as PDFs
  • Offline PDF conversion after initial setup
  • Producing PDFs from CJK-heavy content with correct font rendering

示例工作流

输入

User asks: Convert report.md to report.pdf

智能体
  1. 1

    Run md2pdf-local.sh, which downloads Twemoji 14.0.0 (~150MB) to ~/.cache/md2pdf/ on first use

  2. 2

    Python script scans the cached PNG files and generates emoji_mapping.json

  3. 3

    Pandoc converts Markdown to HTML, applying a Lua filter that replaces emoji characters with local image paths

  4. 4

    WeasyPrint renders the HTML to PDF using AR PL UMing CN for CJK characters and local emoji PNGs

输出

report.pdf with correct Chinese characters, colorful emojis, code highlighting, and page numbers

前置要求

  • Pandoc installed
  • WeasyPrint installed (pip3 install weasyprint or apt-get install python3-weasyprint)
  • AR PL UMing CN font installed for Chinese character rendering (apt-get install fonts-arphic-uming)

安装

clawhub install tianxingleo/md2pdf-converter

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接