Skip to content

VersusOS

PDFMathTranslate vs BabelDOC: Which Local PDF Translator Should You Use?

PDFMathTranslate and BabelDOC both translate PDFs while keeping layouts and can use local AI models through Ollama. Using their official docs, we compare how they're related, ease of use, local model support, output options and which one you should install.

By , Senior Hardware Editor

3 min read

PDFMathTranslate vs BabelDOC: Which Local PDF Translator Should You Use?

PDFMathTranslate and BabelDOC both translate PDFs while keeping layouts and formulas, and both can use a local AI model instead of a cloud service. They're closely related: BabelDOC is the translation engine behind PDFMathTranslate 2.0.

The short version

PDFMathTranslate

BabelDOC

What it is

An application for translating scientific PDFs while preserving layouts

A PDF translation and bilingual comparison library

Versions

1.x (pdf2zh, stable) and 2.0 (pdf2zh-next, based on BabelDOC)

Single library, used by PDFMathTranslate 2.0

Interfaces

Command line, browser GUI, Windows ZIP or EXE, Docker

Command line and Python API

Translation services

Many, including Ollama (1.x), OpenAI-compatible APIs, Google and DeepL

OpenAI-compatible LLMs only

Licence

AGPL v3

AGPL v3

Aimed at

End users

Developers embedding it in other programs

PDFMathTranslate began as an application, and version 2.0 moved to a new repository, PDFMathTranslate-next. That version describes itself as based on BabelDOC and as the official reference implementation for calling BabelDOC to translate PDFs. The 1.x README also lists BabelDOC as a new backend, and pdf2zh 1.x has an experimental --babeldoc option. In practice, PDFMathTranslate is the app and BabelDOC is the engine.

Ease of use

PDFMathTranslate is the friendlier choice. Version 2.0 has a recommended Windows EXE that opens a WebUI in your browser, while 1.x offers pdf2zh -i for a browser GUI and a Windows ZIP, and both offer Docker. BabelDOC is installed with uv and run from the command line or Python, and its own README says that the CLI is mainly for debugging, that it doesn't provide technical support for end users, and that end users who want to self-host should use PDFMathTranslate 2.0.

Local AI support

Both can keep translation on your PC. PDFMathTranslate 1.x has a dedicated ollama service configured with OLLAMA_HOST and OLLAMA_MODEL, and also supports Xinference and OpenAI-compatible endpoints. Version 2.0 lists an OpenAICompatible engine as officially supported, and its WebUI has an Ollama host field. BabelDOC only supports OpenAI-compatible LLMs, but its README notes that for local models like Ollama you can use any value as the API key. Ollama provides an OpenAI-compatible API at http://localhost:11434/v1/, as covered in our Ollama OpenAI API guide.

One difference to watch: PDFMathTranslate 1.x uses Google by default, so you must choose a local service explicitly. BabelDOC uses whichever OpenAI-compatible endpoint you give it.

Output and options

Both produce a translated PDF and a bilingual PDF. PDFMathTranslate 1.x names them -mono.pdf and -dual.pdf; BabelDOC can skip either with --no-mono or --no-dual and can alternate original and translated pages instead of placing them side by side. BabelDOC also has glossary CSV files, automatic term extraction, page splitting for large documents and compatibility options for awkward PDFs. PDFMathTranslate 1.x offers page ranges, batch folder translation, custom prompts, an ultrafast mode for native-text PDFs and experimental OCR for scanned pages.

Language focus

BabelDOC says it mainly focuses on English-to-Chinese translation, that other scenarios haven't been tested yet, and that basic English target language support was added in March 2025. PDFMathTranslate supports multiple languages through options such as -li and -lo.

Which should you choose?

  • Choose PDFMathTranslate if you want an app you can use straight away, a Windows download, a browser interface or the simplest Ollama set-up. Our guide to translating PDFs with PDFMathTranslate and Ollama gets you started.

  • Choose BabelDOC if you're building PDF translation into your own scripts or software and are comfortable with Python and the command line.

For more options, including fully offline translation without an LLM, see our best local AI PDF translators. If you want to turn PDFs into text for other AI tools instead, try our Docling PDF to Markdown guide.

The bottom line

For most people, PDFMathTranslate is the one to use: it's an end-user app with Windows downloads, a browser interface and straightforward local Ollama support. BabelDOC is the engine behind PDFMathTranslate 2.0 and is best treated as a library for developers, since its own documentation says its command line is mainly for debugging and points end users to PDFMathTranslate 2.0.

Sources

  1. 01PDFMathTranslate on GitHub (1.x README)
  2. 02PDFMathTranslate 1.x: Advanced usage (docs/ADVANCED.md)
  3. 03PDFMathTranslate-next on GitHub (PDFMathTranslate 2.0 README)
  4. 04PDFMathTranslate 2.0 docs: Documentation of Translation Services
  5. 05BabelDOC on GitHub (funstory-ai)
  6. 06Ollama docs: OpenAI compatibility

About the author

Callum Reid

Senior Hardware Editor

Callum leads GPU, CPU and platform architecture coverage at Forge PC. Before joining the editorial desk, he spent nine years specifying, assembling and stress-testing custom gaming and workstation systems in the UK, with a focus on PCIe bandwidth, VRM thermal design, DDR5 memory tuning and 1440p/4K frame-time consistency.

More from Callum Reid

Read next

How to Rename Your PC in Windows 11

How-To

How to Rename Your PC in Windows 11

Stuck with a random PC name like DESKTOP-something? We show how to check your current computer name and rename your PC in Windows 11 using Settings or PowerShell's Rename-Computer, following Microsoft's documentation, plus the naming rules that keep the new name working on your network.

Marcus Thorne3 min

The Best Steam Features Every PC Gamer Should Be Using in 2026

Best Picks

The Best Steam Features Every PC Gamer Should Be Using in 2026

Steam is much more than a shop and launcher. Using Valve's own support pages and documentation, we pick the best built-in Steam features for PC gamers, from Game Recording and the Performance Monitor to Steam Cloud, Steam Families, Remote Play, Big Picture mode, Steam Input and file verification.

Hannah Vance5 min

How to Customise the Lock Screen in Windows 11

How-To

How to Customise the Lock Screen in Windows 11

Windows 11's lock screen doesn't have to stay on the defaults. Following Microsoft's support guide, we show how to set Windows spotlight, a picture or a slideshow, turn off the tips and fun facts, show the same image on the sign-in screen, and add, reorder or hide lock screen widgets.

Marcus Thorne3 min

How to Translate PDFs Locally with PDFMathTranslate and Ollama

How-To

How to Translate PDFs Locally with PDFMathTranslate and Ollama

PDFMathTranslate (pdf2zh) can translate a PDF while keeping formulas, charts and layout, using a model running in Ollama on your own PC. Here's how to install it, connect it to Ollama, pick languages and pages, and avoid accidentally using its default online service.

Marcus Thorne3 min