← Back to Skills Marketplace
zacjiang

Markdown to PDF (CJK)

by Shihao Jiang (Zac) · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1307
Downloads
1
Stars
10
Active Installs
1
Versions
Install in OpenClaw
/install md-to-pdf-cjk
Description
Convert Markdown files to professional PDF documents with full CJK (Chinese/Japanese/Korean) support. Uses reportlab for reliable rendering without external...
README (SKILL.md)

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
Usage Guidance
This skill is largely coherent and low-risk (it runs locally, reads local fonts and the input file, and uses reportlab). However: (1) the SKILL.md usage example is incorrect — the script expects two args (input.md and output.pdf); do not pass an extra "Document Title" argument. (2) Some claimed features (automatic page numbering) are not implemented in the script. Before installing/using: run a quick test with a sample Markdown file, ensure reportlab is installed (pip3 install reportlab), and install a system CJK font (fonts-noto-cjk) if you need correct CJK rendering. As always, only run the script on files you trust and verify behavior in a safe environment.
Capability Analysis
Type: OpenClaw Skill Name: md-to-pdf-cjk Version: 1.0.0 The skill is a legitimate utility for converting Markdown files to PDF with CJK character support using the reportlab library. The Python script (scripts/md_to_pdf.py) performs standard file operations and font discovery within system directories (/usr/share/fonts) without any evidence of data exfiltration, remote code execution, or malicious intent. While there is a minor inconsistency between the usage example in SKILL.md and the script's argument handling, it is a functional bug rather than a security risk.
Capability Assessment
Purpose & Capability
The skill's stated purpose (convert Markdown to PDF with CJK support using reportlab) matches the included script: the script parses markdown, finds system fonts, registers a CJK-capable font, and writes a PDF. No unrelated credentials, binaries, or external services are requested.
Instruction Scope
SKILL.md shows a usage example that includes a "Document Title" argument (python3 ... input.md "Document Title" output.pdf), but the script only accepts two arguments (input and output). SKILL.md also claims features like automatic page numbering which the script does not implement. This mismatch could confuse users and cause incorrect invocation.
Install Mechanism
There is no install spec (instruction-only). SKILL.md recommends `pip3 install reportlab`, which is a reasonable, minimal dependency for PDF generation. Nothing is downloaded from untrusted URLs and no archives are extracted by the skill.
Credentials
The skill requests no environment variables or credentials. The script reads local font directories (/usr/share/fonts, /usr/local/share/fonts) and the input markdown file — these are expected for font auto-detection and conversion and are proportionate to the stated purpose.
Persistence & Privilege
The skill does not request persistent presence (always:false) and does not modify other skills or system-wide agent settings. It runs as an on-demand script with no elevated privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install md-to-pdf-cjk
  3. After installation, invoke the skill by name or use /md-to-pdf-cjk
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: lightweight MD to PDF with Chinese/Japanese/Korean support
Metadata
Slug md-to-pdf-cjk
Version 1.0.0
License
All-time Installs 10
Active Installs 10
Total Versions 1
Frequently Asked Questions

What is Markdown to PDF (CJK)?

Convert Markdown files to professional PDF documents with full CJK (Chinese/Japanese/Korean) support. Uses reportlab for reliable rendering without external... It is an AI Agent Skill for Claude Code / OpenClaw, with 1307 downloads so far.

How do I install Markdown to PDF (CJK)?

Run "/install md-to-pdf-cjk" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Markdown to PDF (CJK) free?

Yes, Markdown to PDF (CJK) is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Markdown to PDF (CJK) support?

Markdown to PDF (CJK) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Markdown to PDF (CJK)?

It is built and maintained by Shihao Jiang (Zac) (@zacjiang); the current version is v1.0.0.

💬 Comments