PDFMathTranslate
PDFMathTranslate is an open-source tool for translating scientific PDF documents while preserving layouts, formulas, charts, tables, and annotations. It supports multiple translation services and CLI, GUI, Docker, and Zotero workflows.
Visit PDFMathTranslate/PDFMathTranslateOverview
PDFMathTranslate translates scientific PDF documents while preserving their layouts, including formulas, charts, tables of contents, and annotations. It provides command-line, browser-based GUI, Docker, and Zotero workflows, with support for multiple languages and translation services.
Key Features
- Preserves formulas, charts, table of contents, and annotations in translated PDFs.
- Supports multiple languages and diverse translation services, including Google, DeepL, Ollama, and OpenAI.
- Produces monolingual translated PDFs and bilingual dual PDFs.
- Offers command-line, interactive GUI, Docker, and Zotero plugin usage.
- Includes experimental OCR for image-only pages and an ultrafast mode for native-text PDFs.
- Provides Python and HTTP APIs for downstream development.
Use Cases
- Researchers and developers can translate scientific papers while retaining formulas, charts, and layout.
- Readers can generate bilingual dual PDFs alongside monolingual translated PDFs.
- Teams can run translation locally through the CLI or GUI, or deploy it with Docker.
- Developers can integrate PDF translation into downstream Python or HTTP API applications.
Getting Started
- Install with pip install pdf2zh, or use uv tool install --python 3.12 pdf2zh.
- Run pdf2zh document.pdf to translate a local PDF; output files are generated in the current working directory.
- Start the browser GUI with pdf2zh -i and open http://localhost:7860/ if it does not open automatically.
- Docker users can pull byaidu/pdf2zh and run it on port 7860.
Deployment & Requirements
- Python 3.11 to 3.12 is required for local Python installation.
- Docker deployment uses byaidu/pdf2zh and exposes port 7860.
- An alternative container image is available at ghcr.io/byaidu/pdfmathtranslate.
- The Windows app is distributed as a win64 zip; vc_redist.x64.exe may be needed if the app does not open.
Before You Adopt
- License: AGPL-3.0. Review its terms before using, modifying, or distributing the project.
- The AI model download can fail in some network environments.
- Precise mode is experimental and requires the pdf2zh_next submodule.