mrkeyoor.com_
Wed 23 Sept 19:34 UTC
AI Toolsevaluationupdated 26 Aug 2026

BabelDOC review

BabelDOC is a Python library and command-line tool for translating scientific PDFs while trying to preserve their original page layout, formulas, tables, and typography. It can produce translated and bilingual PDFs through an OpenAI-compatible model endpoint, and it is mainly intended as an engine inside another application.

+41stars / 7d
Verdict

Our BabelDOC environment built in 8 seconds and pip-audit found 0 known vulnerabilities, but Pytest discovered 0 tests and exited 5, so source-level confidence must come from your own PDF fixtures. Use it as an engine when preserving scientific-paper layout is worth model costs and visual review. For a supported self-hosted application, follow the project's own recommendation and start with PDFMathTranslate-next.

We ran it

Lab card: what happened when we ran BabelDOCScreenshot of BabelDOC (funstory-ai.github.io/BabelDOC)
Install✓ · 82s105 packages · 794 MB
Build✓ · 8s
Tests✗ · 10s0 passed · 0 failed of 0 (pytest)
Known vulns0(pip-audit)
Repo410 files~77,258 lines of source · 19.9 MB · 7 CI workflows

Answers from our run

Does BabelDOC build from source?

Dependencies installed in 82 seconds (105 packages), and the build succeeded in 8 seconds. We cloned commit 38d3896 into a clean Debian container with 3 CPUs and no project-specific setup.

Do BabelDOC's tests pass?

Yes: 0 of 0 passed when we ran the project's own test command (pytest). Some failures need services or credentials a bare container does not have.

Does BabelDOC have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use BabelDOC?

End users expecting support for the standalone CLI: the README calls it a debugging interface and directs self-hosters to PDFMathTranslate-next.

What are the alternatives to BabelDOC?

PDFMathTranslate-next, Immersive Translate, MinerU. Our BabelDOC environment built in 8 seconds and pip-audit found 0 known vulnerabilities, but Pytest discovered 0 tests and exited 5, so source-level confidence must come from your own PDF fixtures.

Setup3/582-second install; model credentials and assets are still required
Docs4/5Extensive CLI detail with unusually clear support boundaries
Community4/59,407 stars with active document-specific issue reports
Maturity3/5v0.6.4 handles hard PDFs, but our run found no tests

Who it’s for

Developers building a PDF translation service around a Python library.
Researchers who need bilingual copies of English scientific papers with formulas left in place.
Teams that can supply an OpenAI-compatible model endpoint and inspect rendered output page by page.
Operators who need offline bundles for the layout models and fonts used during document processing.

Who it’s NOT for

End users expecting support for the standalone CLI: the README calls it a debugging interface and directs self-hosters to PDFMathTranslate-next.
Applications depending on a stable public Python API: the README says every BabelDOC API should be treated as internal and unsupported.
Translation pairs outside its English-to-Chinese focus without document trials: the README says other scenarios have not been tested.
Hindi output that must shape correctly today: open issue 598 reports misplaced Devanagari vowel marks.
Archival workflows that must preserve navigation: open issue 203 reports lost PDF bookmarks after translation.
Teams using test discovery as a release gate: our Pytest run found 0 tests and exited 5.

Setup reality

Our sandbox installed 105 Python packages in 82 seconds and occupied 794 MB. The build succeeded in 8 seconds, and pip-audit found 0 known vulnerabilities. Pytest exited 5 after 10 seconds because it collected 0 tests; its warning said no files were found in the configured test paths.

A real translation needs a PDF plus an OpenAI-compatible base URL, model name, and API key. BabelDOC also uses layout assets and fonts, which can be warmed up or bundled for offline hosts. Local model endpoints are possible through the same API shape, but translation quality remains the model operator's responsibility.

Python 3.12 with uv is the documented install path. The CLI is described as a debugging interface with no end-user technical support, and direct Python APIs are internal. Scanned files, tables, formulas, fonts, and mixed scripts each have separate switches or reported edge cases, so one successful build is not an output-quality check.

The 794 MB install is a PDF engine, not a finished service

BabelDOC breaks a PDF into layout elements, sends translatable text to a model, and renders new pages while trying to keep formulas, figures, tables, fonts, and reading order recognizable. It can create a translated PDF, a bilingual copy, or both. The subject is mainly scientific papers, where flattening a page into plain text loses much of what makes the document usable. Glossaries and automatic term extraction help keep repeated technical terms consistent.

The project is explicit about its place in a larger product. Our checkout had 410 files and about 77,258 lines of source, while installation expanded to 105 packages and 794 MB. The command line is mainly for maintainers and debugging. Direct Python APIs are considered internal. For self-deployment with a web interface and more translation services, the README points users to PDFMathTranslate-next, which uses BabelDOC underneath.

English-to-Chinese papers are the tested center

The default source and target are English and Chinese, and the README says other translation scenarios have not been tested yet. An OpenAI-compatible endpoint supplies the translation model, including local services that implement the same request shape. BabelDOC's own work is document interpretation and reconstruction: detecting paragraphs, protecting formulas, fitting translated text, selecting fonts, and drawing the result back into PDF pages.

That focus matters because a language code does not guarantee correct shaping. Open issue 598 reports that Hindi Devanagari output places the short i vowel mark after its consonant instead of visually before it. Issue 613 shows another document-specific failure in v0.6.4: ordinary New Computer Modern text fonts were classified as formula fonts, leaving most body text as untranslated placeholders before the model saw it. Test the exact fonts and script used by your corpus.

What happened when we ran it

Our sandbox installed 105 packages in 82 seconds and used 794 MB on disk. Building commit 38d3896 succeeded in 8 seconds inside an unprivileged Python 3.12 Debian container with 3 CPUs, 8 GB of RAM, and no secrets. Pip-audit reported 0 known vulnerabilities. The checkout contained 7 CI workflow files, no Dockerfile, and no tests directory.

Pytest returned exit code 5 after 10 seconds. It collected 0 tests, so there were 0 passes and 0 failures. The warning said no files were found in testpaths and suggested removing or adjusting that configuration. This result is neither a failed assertion nor a passing suite. It means our normal test command had nothing to execute, leaving the 8-second build as a packaging check rather than evidence that translated pages are correct.

Every production corpus needs visual fixtures

PDF reconstruction fails in ways that a successful API response cannot see. Text can remain untranslated, wrap into the wrong number of lines, overlap nearby content, lose styling, or be mistaken for formulas. Open issue 609 includes a document where English sections remained in the result. Issue 592 reports overlapping and merged lines even though the translation completed and the output PDF was saved. These are rendering outcomes, so HTTP status and token counts are insufficient acceptance checks.

Build a fixture set from real input, not clean sample papers. Ten pages covering columns, tables, footnotes, equations, bookmarks, scanned pages, highlighted text, and the target script will reveal more than 0 collected unit tests. Render every output page to an image, compare structure, search for unexpectedly retained source-language passages, and open the file in more than one PDF reader. Human review is still needed for meaning and formula context.

Model credentials and assets define the runtime

The basic command needs an endpoint, model name, API key, and one or more PDF paths. Query rate defaults to 4 per second, and worker counts can follow that setting. Layout models and fonts can be downloaded during warmup. For restricted networks, BabelDOC can generate an offline asset archive, verify it with SHA3-256 hashes, and restore it on target machines. Translation calls still need a reachable model unless that endpoint is local.

Source installation is documented with uv and Python 3.12. One open report for v0.6.3 on Apple Silicon describes a cryptography library symbol error before any API request was made. Our 82-second Debian install did not show that failure, so it should not be generalized to Linux. Mac operators should still run an actual one-page translation, since babeldoc --help does not load every native component used in the processing path.

Releases are active, while issue activity is more recent

Version 0.6.4 was released on July 16, 2026. It added a per-page raster pixel budget for oversized scan metadata and fixed spacing between mixed Latin and CJK lines. GitHub recorded the last code push on August 5, with issue activity continuing through August 21. The repository had 9,407 stars and 84 open issues and pull requests when fetched, so the dated push and current document reports together show ongoing use and maintenance.

BabelDOC is worth adopting when your product needs its intermediate document model and you can own regression testing. The 8-second build lowers the cost of trying the source, but 0 collected tests and live layout reports make unattended output risky. Pin the model and package version, keep representative PDFs, compare rendered pages after upgrades, and send end users to a supported application rather than exposing the debugging CLI as your product.

Alternatives

ProjectWhat it isPick it when
PDFMathTranslate-nextA self-hostable PDF translation application with a web interface and several translation services.pick this instead when you want the supported self-deployment path that BabelDOC's own README recommends.
Immersive TranslateA bilingual translation extension covering web pages, PDFs, ebooks, subtitles, and text files.pick this instead when an end-user browser workflow matters more than embedding a Python PDF engine.
MinerU gh↗A document parser that converts PDFs and office files into structured Markdown or JSON.pick this instead when extracting document structure for later processing is the goal, not producing a translated PDF.

What people are saying

  1. [github-trending] funstory-ai/BabelDOC

Sources

  1. BabelDOC repository and README
  2. BabelDOC v0.6.4 release
  3. New Computer Modern formula classification report
  4. Hindi shaping report
  5. Untranslated PDF content report
  6. PDF line overlap report
  7. Bookmark preservation request

More ai tools reviews

transformer-explainer · spirula-studio · reverify · course2md · interdimensional-game · shrimply · the whole board →