Skip to content

Translate PDFs into any language while keeping original layout, colors, backgrounds, and positions intact.

CCM score
52 of 100
skills.sh installs
1.2K
GitHub stars
24
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers a three-step flow: extract text strings, write a JSON translation map, then apply the translations to produce a new PDF
  • Includes extract_texts.py and translate_pdf.py, with a --font option for Latin, Simplified and Traditional Chinese, Japanese, and Korean
  • Appends a language suffix to output filenames such as _EN, _ZH, or _JA and scales CJK text to 90% for fit
  • Designed for requests to translate a PDF into another language, including Chinese, English, and Japanese triggers

Install

$ npx -y skills add wshuyi/translate-pdf-skill --skill translate-pdf -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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:

{
  "Original Text 1": "Translated 1",
  "Original Text 2": "Translated 2"
}

Save as translations.json next to input PDF.

Step 3: Apply translations

python {skill_path}/scripts/translate_pdf.py <input.pdf> translations.json <output.pdf> --font <fontname>

Font options:

FontLanguage
helvLatin (English, Spanish, Portuguese, French, German, etc.)
china-ssSimplified Chinese
china-tsTraditional Chinese
japanJapanese
koreaKorean

Output naming

Append language suffix: filename_EN.pdf, filename_ZH.pdf, filename_JA.pdf

Tips

  • Keep proper nouns, abbreviations, technical terms unchanged when appropriate
  • CJK fonts auto-scale to 90% for better fit
  • Use transparent fill to preserve original background colors

Details

Repository
github.com/wshuyi/translate-pdf-skill
Categories
Office Files & Slides, Writing & Content
First seen
Apr 16, 2026

Similar to Translate Pdf

More Office Files & Slides