pdf-translate
Skill0 starsChanged 5 months agoMITView on GitHub
Use when translating PDF documents between languages while preserving original layout, images, tables, and formulas using pdf2zh (PDFMathTranslate).
- Reads credentials
- Installs packages
6 other projects use a version of this.
Adopted by
Most recently taken up by
- lxsssssss/pdf-translatetheir own version, first seen Sep 15, 2026
- hoangtung386/Tool-Translate-OpenRoutertheir own version, first seen Aug 27, 2026
- ghbhiee/skillstheir own version, first seen Aug 21, 2026
- yezzes1231-ship-it/pdf-translate-skilltheir own version, first seen Aug 6, 2026
- AIKONG2024/paper-translate-agent-skilltheir own version, first seen Jul 26, 2026
- L27z18328742/pdf-translatetheir own version, first seen Jul 2, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- lxsssssss/pdf-translate★ 101same name
- L27z18328742/pdf-translate★ 71same name
- AIKONG2024/paper-translate-agent-skill★ 3same name
- ghbhiee/skills★ 1same name
- hoangtung386/Tool-Translate-OpenRouter★ 1same name
- yezzes1231-ship-it/pdf-translate-skill★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
No API key needed for Google Translate backend (free, no sign-up).
- Distinctive: line 169
Compatibility issues: If the output has rendering problems, try compatibility mode:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PDF Translation with Layout Preservation (pdf2zh)
Translate PDF documents between languages while fully preserving original layout, images, tables, formulas, and typography. Uses pdf2zh (PDFMathTranslate, accepted at EMNLP 2025) with Google Translate as the free default backend.
Output: two files — *-mono.pdf (translated only) and *-dual.pdf (bilingual side-by-side).
When to Use
- You need to translate a PDF from one language to another
- The original layout, images, and formatting must be preserved
- You want a bilingual version for comparison
- The document contains tables, formulas, or complex layouts
- Scanned PDFs or documents with embedded images
Don't use for: simple text extraction without layout preservation (use ocr-and-documents skill instead).
Prerequisites
# Install pdf2zh
pip install pdf2zhNo API key needed for Google Translate backend (free, no sign-up).
Usage
Basic Translation
# Translate Chinese to English
pdf2zh input.pdf -li zh -lo en -s google
# Translate English to Chinese
pdf2zh input.pdf -li en -lo zh -s google
# Translate Japanese to English
pdf2zh input.pdf -li ja -lo en -s google
# Translate French to Chinese
pdf2zh input.pdf -li fr -lo zh -s googleThis generates:
input-mono.pdf— translated-only versioninput-dual.pdf— bilingual version (original left, translated right)
Specify Custom Output Directory
pdf2zh input.pdf -li zh -lo en -s google -o ./output/Translate Specific Pages Only
pdf2zh input.pdf -li zh -lo en -s google -p 1-10Translate from URL (Online PDF)
pdf2zh https://example.com/document.pdf -li zh -lo en -s googleBatch Translate an Entire Folder
pdf2zh --dir ./pdfs/ -li zh -lo en -s googleGUI Mode (Browser Interface)
pdf2zh -i
# Opens at http://localhost:7860Use Different Translation Backends
| Backend | Command | API Key Needed |
| Google (free) | -s google | No |
| DeepL | -s deepl | Yes (higher quality) |
| OpenAI | -s openai | Yes |
| Ollama (local) | -s ollama | No (local LLM) |
| Azure | -s azure | Yes |
| Claude | -s claude | Yes |
Language Codes (Common)
| Language | Code |
| Chinese (Simplified) | zh |
| Chinese (Traditional) | zh-TW |
| English | en |
| Japanese | ja |
| Korean | ko |
| French | fr |
| German | de |
| Spanish | es |
| Russian | ru |
| Arabic | ar |
| Portuguese | pt |
| Italian | it |
Parameter Reference
| Flag | Description | Example |
-li | Source language | -li zh |
-lo | Target language | -lo en |
-s | Translation service | -s google |
-p | Specific pages | -p 1,3,5-10 |
-o | Output directory | -o ./output/ |
-t | Thread count | -t 4 |
-f | Exclude text (regex) | -f "(MS.*)" |
--dir | Batch translate folder | --dir ./pdfs/ |
-i | Launch GUI | -i |
--compatible | Compatibility mode | --compatible |
--ignore-cache | Bypass translation cache | --ignore-cache |
One-Shot Recipes
Quick Translate a Local PDF
pip install -q pdf2zh && pdf2zh input.pdf -li zh -lo en -s googleTranslate with Higher Quality (OpenAI)
pdf2zh input.pdf -li zh -lo en -s openai
# Requires OPENAI_API_KEY in environmentCommon Pitfalls
- Model download failure: pdf2zh downloads a layout detection model (
wybxc/DocLayout-YOLO-DocStructBench-onnx) on first run. If blocked by network, set:export HF_ENDPOINT=https://hf-mirror.com - Large PDF processing: For documents with 100+ pages, increase thread count:
pdf2zh input.pdf -li zh -lo en -s google -t 4 - Translation rate limits: Very large documents may hit the translation service's rate limit. Try splitting the document:
pdf2zh input.pdf -li zh -lo en -s google -p 1-20 pdf2zh input.pdf -li zh -lo en -s google -p 21-40 - Compatibility issues: If the output has rendering problems, try compatibility mode:
pdf2zh input.pdf -li zh -lo en -s google --compatible
Verification Checklist
*-mono.pdfexists and contains translated text*-dual.pdfexists with bilingual layout- Images/graphics from original are preserved
- Tables and formulas render correctly
- Page count matches original
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

