Skip to main content
Back

BabelDOC Translates Dense Academic PDFs Without Breaking Math or Layout

BabelDOC translates scientific PDFs into bilingual documents while preserving layout, formulas, and terminology — now backed by an ACL 2026 paper

  • What it is: BabelDOC is an open-source Python library that translates PDFs into bilingual documents while preserving layout, math formulas, and terminology — 9K+ GitHub stars.
  • Key innovation: An Intermediate Representation (IR) that decouples layout metadata from text, enabling document-level NLP operations like cross-page context and automatic glossary extraction.
  • Benchmark results: Scored 4.59/5 for layout fidelity in human evaluation, beating PDFMathTranslate (3.29) and DeepL (3.44) on a 200-page benchmark of arXiv papers, technical docs, and patents.
  • Free tier: 1,000 free pages/month via Immersive Translate online service; self-host with any OpenAI-compatible model for near-zero cost.
  • Limitations: Primarily optimized for English-to-Chinese; cross-page paragraph splits still reduce accuracy; author/reference sections can merge incorrectly.
  • Research backing: ACL 2026 paper formalizes the IR paradigm and evaluation methodology against DeepL and PDFMathTranslate baselines.

BabelDOC is an open-source Python library that translates PDF documents, especially dense academic papers, into bilingual side-by-side outputs while preserving the original layout. Math formulas stay rendered, multi-column grids stay aligned, footnotes get translated, and a glossary system keeps technical terms consistent across pages. With over 9,000 GitHub stars and a paper accepted at ACL 2026, it has become the default backend for serious PDF translation in the open-source ecosystem.

The problem researchers keep hitting

PDFs dominate scientific research, commerce, law, and technical exchange, but English's dominance in global knowledge production shuts out non-English-speaking researchers in ways that compound over time. The obvious workaround, copying text into Google Translate, destroys all formatting. Commercial tools like DeepL handle documents but mangle multi-column layouts and drop math entirely. Existing pipelines force a choice between linguistic accuracy and structural fidelity: translation tools discard layout metadata, while document parsers can extract content but cannot re-render it faithfully after translation. BabelDOC was built to avoid that tradeoff entirely.

The IR architecture doing the heavy lifting

The core innovation is an Intermediate Representation (IR), a structured JSON snapshot of the entire document that keeps layout metadata and text completely separate. Rather than treating translation as a black-box end-to-end task, BabelDOC explicitly decouples visual layout from semantic content. That separation enables document-level operations that monolithic pipelines cannot support: terminology extraction, cross-page context handling, glossary-constrained generation, and formula placeholdering. Once translation is complete, the translated content is re-anchored to the original layout through an adaptive typesetting engine.