研究Apr 2, 2026·2 min read

PDFMathTranslate — Translate PDF Papers Preserving Format

Translate PDF scientific papers while preserving math formulas, charts, and layout. Supports Google, DeepL, OpenAI, Ollama. CLI, GUI, MCP, Docker, Zotero plugin.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

```bash pip install pdf2zh # Translate a PDF (entire document) pdf2zh input.pdf # Translate specific pages with DeepL pdf2zh input.pdf -p 1-10 -s deepl # Use OpenAI for translation pdf2zh input.pdf -s openai:gpt-4o # Use local Ollama model pdf2zh input.pdf -s ollama:qwen2.5 ``` **GUI mode:** ```bash pdf2zh -g # Opens a web interface at http://localhost:7860 ``` **Docker:** ```bash docker run -d -p 7860:7860 byaidu/pdf2zh ```
Intro
PDFMathTranslate (pdf2zh) solves the hardest problem in academic PDF translation: preserving mathematical formulas, charts, tables, and layout while translating text. Most translation tools butcher LaTeX equations and destroy figure layouts — pdf2zh keeps them pixel-perfect. Featured at EMNLP 2025, it supports 10+ translation backends including Google Translate, DeepL, OpenAI, Anthropic, and local models via Ollama. Integrates with Zotero for one-click translation of your research library. Available as CLI, GUI, Docker, and even an MCP server.
### Translation Backends | Backend | Quality | Speed | Cost | |---------|---------|-------|------| | **Google Translate** | Good | Fast | Free | | **DeepL** | Excellent | Fast | Free tier available | | **OpenAI (GPT-4o)** | Excellent | Moderate | API cost | | **Anthropic (Claude)** | Excellent | Moderate | API cost | | **Ollama (local)** | Good | Depends on GPU | Free | | **Azure Translate** | Good | Fast | Free tier | ### What Gets Preserved - **Math formulas** — LaTeX equations rendered correctly in output - **Charts and figures** — untouched, positioned correctly - **Tables** — structure preserved, text translated - **References and citations** — formatting maintained - **Page layout** — columns, margins, headers/footers kept - **Hyperlinks** — clickable links preserved ### Zotero Integration Install the Zotero plugin from [GitHub Releases](https://github.com/Byaidu/PDFMathTranslate/releases). Right-click any PDF in your Zotero library → "Translate with pdf2zh". Translated PDF appears alongside the original. ### Output Options - **Dual-column PDF** — original + translation side by side - **Translated PDF** — clean translated version only - **Bilingual mode** — original text with translation below each paragraph
🙏

Source & Thanks

- **GitHub**: [Byaidu/PDFMathTranslate](https://github.com/Byaidu/PDFMathTranslate) — 32,600+ stars, AGPL-3.0 License - **PyPI**: `pdf2zh` - Featured at EMNLP 2025

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets