--- id: babeldoc version: "0.6.4" license: AGPL-3.0 license_treatment: agpl maintenance: active --- # BabelDOC — Yet Another Document Translator License: agpl · Maintenance: active · Downloads: 74.3K/mo ## What it is and what it does BabelDOC is a PDF translation and bilingual comparison library designed primarily to translate scientific papers from English to Chinese while preserving layout and formatting. It can produce side-by-side or alternating-page dual PDFs showing original and translated text. The package is built on a large stack of ML and computer vision dependencies (onnxruntime, opencv, scikit-learn, etc.) to handle PDF parsing, text extraction, layout analysis, and rendering. It exposes both a command-line interface for simple translation tasks and a Python API for embedding into other programs. The package is actively maintained and young (first release February 2025), with an AGPL-3.0 license that requires source disclosure for any modifications. It integrates with external translation services (primarily OpenAI's API) and supports multiple language pairs, though English-to-Chinese is the primary focus and other directions are noted as untested. The 33 runtime dependencies mean a substantial first install, but the wheel distribution keeps setup friction low. Use it for: - Translate a batch of research papers from English to Chinese for reading alongside the original. - Embed PDF translation into a reference management tool like Zotero via the Python API. - Self-host a document translation service with custom translation backends using the library's modular design. - Extract and translate text from scanned PDFs using OCR workaround modes for documents with poor text layers. - Generate dual-language PDFs for academic collaboration where both original and translated versions are needed. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. BabelDOC translates PDF documents between languages, primarily English to Chinese, producing bilingual comparison PDFs with original and translated pages. Yes, if you need to translate PDFs and can accept the AGPL-3.0 license terms and the large dependency footprint. The package is actively maintained, has no known vulnerabilities, and offers both CLI and library modes. No, if you require a permissive license, need production-ready support for non-English-to-Chinese pairs, or want to avoid the 33-dependency install. Yes-with-conditions if you plan to embed it: verify that the Python API is stable for your use case, as the CLI is noted as primarily for debugging. ## Install pip install babeldoc uv add babeldoc poetry add babeldoc ## Installing BabelDOC Before you install: Low install friction with a pure Python wheel. Active maintenance—last commit 2026-08-05, first release 2025-02-11. Carries 33 runtime dependencies including heavy ML/CV stacks (onnxruntime, opencv-python-headless, scikit-learn), which will pull in substantial binary artifacts on first install. License in practice: Licensed under AGPL-3.0. Any modifications or derivative works must be released under the same license and source made available; using this in a proprietary product without disclosure is not permitted. Quickstart: pip install BabelDOC 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 Requires Python 3.10 or later (and <3.14). An OpenAI API key or alternative translation service configuration is needed to actually translate documents. Verify before relying: - Whether non-English-to-Chinese translation pairs are production-ready or experimental. - Performance characteristics and typical translation latency for multi-page documents. - Whether the 1000 free pages/month quota mentioned for the online service applies to self-hosted deployments. - Stability and compatibility of the CLI versus embedding the package as a library in other applications. ## Package facts - License: AGPL-3.0 (agpl) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 74.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags PDF translation, document translator, bilingual PDF, scientific paper translation, multilingual document processing, PDF language conversion, batch PDF translation, pdf-translation, multilingual, document-processing [View on SkillFed](https://skillfed.io/packages/babeldoc) · [View on PyPI](https://pypi.org/project/babeldoc/)