translate-pdf

Installation
Summary

Translate PDF documents to any language while preserving layout, colors, and styling.

  • Three-step workflow: extract text strings, create a JSON translation mapping, then apply translations with language-specific font selection
  • Supports five font families covering Latin languages, Simplified Chinese, Traditional Chinese, Japanese, and Korean
  • CJK fonts automatically scale to 90% for optimal text fitting within original PDF boundaries
  • Preserves all original formatting including colors, backgrounds, and element positioning
SKILL.md

PDF Translation

Translate PDF text while preserving structure, colors, and background styling.

Workflow

Step 1: Extract texts

python {skill_path}/scripts/extract_texts.py <input.pdf>

Review output to see all unique text strings in the PDF.

Step 2: Create translation mapping

Translate each text to target language. Create JSON file:

Installs
648
GitHub Stars
7
First Seen
Jan 22, 2026