md-to-pdf-cjk

Convert Markdown files to professional PDF documents with full CJK (Chinese/Japanese/Korean) support. Uses reportlab for reliable rendering without external dependencies like wkhtmltopdf or LaTeX.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "md-to-pdf-cjk" with this command: npx skills add zacjiang/md-to-pdf-cjk

Markdown to PDF (CJK Support)

Convert Markdown to professional PDFs with full Chinese/Japanese/Korean text support.

Why This Exists

Most Markdown-to-PDF tools break on CJK characters, require LaTeX, or need heavy dependencies. This skill uses reportlab for lightweight, reliable PDF generation that works on any server — including 2GB RAM VPS instances.

Usage

python3 {baseDir}/scripts/md_to_pdf.py input.md "Document Title" output.pdf

Features

  • ✅ Full CJK text rendering (Chinese, Japanese, Korean)
  • ✅ Markdown headings, bold, italic, bullet lists, code blocks
  • ✅ Tables with proper column alignment
  • ✅ Automatic page breaks and numbering
  • ✅ Lightweight — runs on minimal servers (2GB RAM)
  • ✅ No LaTeX, no wkhtmltopdf, no Chrome/Puppeteer needed

Supported Markdown Elements

  • # H1 through #### H4 headings
  • **bold** and *italic*
  • - bullet lists (nested supported)
  • | table | rows | (pipe-delimited tables)
  • `inline code` and code blocks
  • --- horizontal rules

Dependencies

pip3 install reportlab

Font Configuration

The script auto-detects CJK fonts in common locations:

  • /usr/share/fonts/ (Linux)
  • /System/Library/Fonts/ (macOS)

If no CJK font is found, it falls back to Helvetica (CJK characters will not render). Install a CJK font:

# RHEL/CentOS/Alibaba Cloud Linux
sudo yum install -y google-noto-sans-cjk-ttc-fonts

# Ubuntu/Debian
sudo apt install -y fonts-noto-cjk

Use Cases

  • Generate PDF reports from AI analysis (audit reports, summaries)
  • Convert documentation to distributable format
  • Create invoices, proposals, or contracts in CJK languages
  • Batch convert multiple Markdown files to PDF

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Markitdown Converter

使用微软 markitdown 库将多种文档格式(PDF、DOC、DOCX、PPT、HTML等)转换为 Markdown。支持批量转换、保留格式、图片提取等功能。使用场景:(1) "把这个 PDF 转成 Markdown",(2) "批量转换这个文件夹里的文档",(3) "提取文档中的图片"。

Registry SourceRecently Updated
600Profile unavailable
General

Doc Genius

支持PDF、Word、Markdown智能摘要和格式转换,提供批量处理与进度报告,提升文档处理效率。

Registry SourceRecently Updated
1310Profile unavailable
General

Language Learning Tutor

AI language tutor for learning ANY language through conversation, vocab drills, grammar lessons, flashcards, and immersive practice. Use when the user wants to: learn a new language, practice vocabulary, study grammar, do flashcard drills, translate phrases, practice conversation, prepare for travel, learn slang/idioms, or improve pronunciation. Supports ALL languages including Spanish, French, German, Japanese, Chinese (Mandarin/Cantonese), Korean, Arabic, Hindi, Bengali/Bangla, Portuguese, Russian, Italian, Turkish, Vietnamese, Thai, Swahili, Hebrew, Polish, Dutch, Greek, and 100+ more.

Registry SourceRecently Updated
4.1K14Profile unavailable
General

Pdf Cn

PDF 文档处理 | PDF Document Processing. 读取、提取、合并、分割 PDF | Read, extract, merge, split PDFs. 支持文本提取、表格识别、注释 | Supports text extraction, table recognition, annotat...

Registry SourceRecently Updated
1.1K0Profile unavailable