PDF Translate for VSCode
Translate PDF documents while preserving layout, formulas, and figures. Powered by PDFMathTranslate.

Features
- Layout Preservation - Maintains original formatting, formulas, and figures
- 40+ Languages - English, Chinese, Japanese, Korean, French, German, and more
- 14+ Translation Services - Google, Bing, OpenAI, DeepL, Gemini, etc.
- Dual Output - Generates translated-only and bilingual versions
- Real-time Progress - Shows translation progress with cancel support
- One-Click Translate - Right-click any PDF to translate
Quick Start
1. Install pdf2zh (Required)
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv tool install --python 3.12 pdf2zh
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install --python 3.12 pdf2zh
2. Translate PDF
- Right-click a PDF file → Translate PDF
- Or press
Ctrl+Shift+P → Translate PDF
Configuration

| Setting |
Default |
Description |
sourceLanguage |
en |
Source language |
targetLanguage |
zh |
Target language |
translationService |
bing |
Translation service |
threads |
4 |
Parallel threads |
Translation Services
| Free (No API Key) |
API Key Required |
Local |
bing (recommended) |
openai |
ollama |
google |
deepl |
|
deeplx |
gemini, deepseek, zhipu |
|
API Keys
{
"pdfTranslate.apiKeys": {
"OPENAI_API_KEY": "sk-xxx",
"DEEPL_AUTH_KEY": "your-key"
}
}
Output
Translated files are saved to translated-pdfs/ folder:
my-document.pdf
translated-pdfs/
├── my-document-mono.pdf (translated)
└── my-document-dual.pdf (bilingual)
Troubleshooting
pdf2zh not found
The extension automatically detects pdf2zh in:
- Your configured path
- uv default path:
~/.local/bin/pdf2zh
If still not found:
- Restart VSCode
- Verify installation:
pdf2zh --version
- Manually set path in settings:
{ "pdfTranslate.pdf2zhPath": "C:\\Users\\Name\\.local\\bin\\pdf2zh.exe" }
Google Translate fails
Use Bing instead (works without proxy):
{ "pdfTranslate.translationService": "bing" }
Links
License
AGPL-3.0