md-to-pdf-cjk

md-to-pdf-cjk is a skill for Claude Code, Codex from HK-hub/AgentSkills. It costs 46 tokens per session (526 once invoked), scanned B, original, MIT.

A Markdown-to-PDF converter that creates professional PDF documents and correctly displays Chinese, Japanese, and Korean text.

In plain words
What is it for?
It helps turn Markdown reports, notes, and technical documents into PDFs with headings, lists, tables, code blocks, page breaks, and page numbers.
Why use it?
It avoids broken CJK characters and removes the need for large tools such as LaTeX, Chrome, or wkhtmltopdf.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps turn Markdown reports, notes, and technical documents into PDFs with headings, lists, tables, code blocks, page breaks, and page numbers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hk-hub/agentskills/md-to-pdf-cjk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HK-hub/AgentSkills --skill md-to-pdf-cjk
Clone the repo
git clone --depth 1 https://github.com/HK-hub/AgentSkills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for md-to-pdf-cjk

README.md
[![agentmods](https://agentmods.dev/badge/skills/hk-hub/agentskills/md-to-pdf-cjk/github.svg)](https://agentmods.dev/skills/hk-hub/agentskills/md-to-pdf-cjk)
Your own site
<a href="https://agentmods.dev/skills/hk-hub/agentskills/md-to-pdf-cjk"><img src="https://agentmods.dev/badge/skills/hk-hub/agentskills/md-to-pdf-cjk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for md-to-pdf-cjk

Your own site · 80×15
<a href="https://agentmods.dev/skills/hk-hub/agentskills/md-to-pdf-cjk"><img src="https://agentmods.dev/badge/skills/hk-hub/agentskills/md-to-pdf-cjk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 526 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00526
Opus 5 $0.00023 $0.00263
Sonnet 5 $0.00009 $0.00105
Haiku 4.5 $0.00005 $0.00053

Measured 7d ago against content hash b5dd2cb360fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

md-to-pdf-cjk scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/md_to_pdf.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo yum install -y google-noto-sans-cjk-ttc-fonts
md-to-pdf-cjk/SKILL.md · 69 lines

What it actually says

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
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 69 lines · 46 tokens per session scan B b5dd2cb360fe

Subscribe to this mod's changes

md-to-pdf-cjk is a skill published in the GitHub repository HK-hub/AgentSkills (6 stars, last pushed 24d ago), licensed MIT. It adds 46 tokens to every session and 526 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

alterlab-open-notebook

Run Open Notebook, a self-hosted open-source alternative to Google NotebookLM with a full REST API, for AI-powered research and document analysis. Use when organizing research materials into notebooks, ingesting diverse content sources (PDFs, videos, audio, web pages, Office documents), generating AI-powered notes and…

AlterLab-IEU/AlterLab-Academic-Skills · 173 tokens

alterlab-treatment-plans

Generates concise (3-4 page), focused medical treatment plans in LaTeX/PDF format across all clinical specialties — general medical treatment, rehabilitation therapy, mental health care, chronic disease management, perioperative care, and pain management — using SMART goal frameworks, evidence-based interventions with…

AlterLab-IEU/AlterLab-Academic-Skills · 107 tokens

fix-mermaid

Validates and repairs mermaid diagrams in markdown files. Scans for mermaid blocks, validates syntax, and auto-repairs common errors.

rp1-run/rp1 · 32 tokens

alterlab-pdf-explore

Explore a single PDF in depth — parse it once, then answer questions across its sections, figures, tables, and appendices — comparing methods across sections, extracting every instance of a pattern within the document, and reading values off its charts and tables. Use when interrogating one paper or report end-to-end…

AlterLab-IEU/AlterLab-Academic-Skills · 150 tokens

alterlab-markitdown

Convert files and Office documents to clean, LLM-friendly Markdown with Microsoft MarkItDown (markitdown CLI/Python), supporting PDF, DOCX, PPTX, XLSX, images (EXIF + OCR), audio (transcription), HTML, CSV, JSON, XML, ZIP archives, EPUB e-books, and YouTube transcript URLs, with optional AI image descriptions. Use…

AlterLab-IEU/AlterLab-Academic-Skills · 147 tokens

office-docs

Use when creating or editing office documents (PDF, Word DOCX, PowerPoint PPTX, Excel XLSX), or applying Diátaxis/STE technical writing standards ('technical-writing').

J-StaR-Films-Studios/VibeCode-Protocol-Suite · 41 tokens