+5
Daily
9,877
stars
830
forks
40
watchers
451
prs
185
issues
215
releases
README
BabelDOC --
--
PDF scientific paper translation and bilingual comparison library.
- Online Service: Beta version launched Immersive Translate - BabelDOC Free usage quota is available; please refer to the FAQ section on the page for details.
- Self-deployment: PDFMathTranslate-next support for BabelDOC, available for self-deployment + WebUI with more translation services.
- Provides a simple command line interface.
- Provides a Python API.
- Mainly designed to be embedded into other programs, but can also be used directly for simple translation tasks.
[!TIP]
How to use BabelDOC in Zotero
1. Immersive Translate Pro members can use the immersive-translate/zotero-immersivetranslate plugin
2. PDFMathTranslate self-deployed users can use the guaguastandup/zotero-pdf2zh plugin
Supported Language
Preview
We are hiring
See details: EN | ZH
Getting Started
Install from PyPI
We recommend using the Tool feature of uv to install BabelDOC.
1. First, you need to refer to uv installation to install uv and set up the PATH environment variable as prompted.
2. Use the following command to install BabelDOC:
bash
uv tool install --python 3.12 BabelDOC
babeldoc --help
3. Use the babeldoc command. For example:
bash
babeldoc --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here" --files example.pdf
multiple files
babeldoc --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here" --files example1.pdf --files example2.pdf
Install from Source
We still recommend using uv to manage virtual environments.
1. First, you need to refer to uv installation to install uv and set up the PATH environment variable as prompted.
2. Use the following command to install BabelDOC:
bash
clone the project
git clone https://github.com/funstory-ai/BabelDOC
enter the project directory
cd BabelDOC
install dependencies and run babeldoc
uv run babeldoc --help
3. Use the uv run babeldoc command. For example:
bash
uv run babeldoc --files example.pdf --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here"
multiple files
uv run babeldoc --files example.pdf --files example2.pdf --openai --openai-model "gpt-4o-mini" --openai-base-url "https://api.openai.com/v1" --openai-api-key "your-api-key-here"
[!TIP]
The absolute path is recommended.
Advanced Options
[!NOTE]
This CLI is mainly for debugging purposes. Although end users can use this CLI to translate files, we do not provide any technical support for this purpose.
End users should directly use Online Service: Beta version launched Immersive Translate - BabelDOC 1000 free pages per month.
End users who need self-deployment should use PDFMathTranslate 2.0
If you find that an option is not listed below, it means that this option is a debugginTop issues
#23Bug: Bad Case from GitHub downstream project10 comments · 2025-01-20#152支持其他文档格式9 comments · 2025-03-13#89feat(layout&typesetting): Precise layout recognition & multi-available space typesetting8 comments · 2025-02-12#127Multilanguage support7 comments · 2025-02-28#478Arabic Language6 comments · 2025-08-27#254不翻译成中文6 comments · 2025-04-17#458使用babeldoc翻译时,翻译后的字变得异常小,几乎看不见5 comments · 2025-07-30#242目录的翻译效果较差5 comments · 2025-04-15
Discussions
#590Before installing the BabelDOC, what are the minimum system requirements for the machine, including the number of CPU cores and the amount of memory0 comments · 2026-04-28#501有没有后端服务版?我想构建一个放到本地1 comments · 2025-09-21#287--bing error1 comments · 2025-04-24
Latest release
v0.7.1 v0.7.1 2026-11-07BabelDOC v0.7.1 Bug Fixes - Fixed a regression in 0.7.0 where constructing TranslationConfig without an input_file (for example, a configuration used only to drive a progress display) raised TypeError. This broke the pdf2zh_next command line with BabelDOC 0.7.0.\ 修复 0.7.0 引入的回归:不传 input_file 构造 TranslationConfig(例如只用于驱动进度显示的配置)时会抛出 TypeError,导致 pdf2zh_next 命令行在 BabelDOC 0.7.0 下无法使用。 --- Changes No changes Contributors @awwaawwa