Pdfmathtranslate
Pdfmathtranslate translates scientific PDF papers into bilingual documents with the original layout preserved (EMNLP 2025 Demo).
Working when we checked on .
What is Pdfmathtranslate?
PDFMathTranslate translates PDF documents and preserves their formats, including mathematical formulas. It is aimed at readers of scientific papers, and the project describes its focus as PDF scientific paper translation. It ships as a command-line tool, an interactive user interface and a Docker image, and its next-generation version adds bilingual comparison. Translation runs through OpenAI API-compatible large language models, and a regex option keeps chosen formula fonts unchanged. An ultrafast mode uses native PDF text positions for heuristic layout and skips ONNX layout detection and OCR.
Pdfmathtranslate pricing
Pricing model: Freemium
Pdfmathtranslate pros
- Offers a command-line tool, an interactive user interface and a Docker image.
- Accepts large language models compatible with the OpenAI API via environment variables.
- Lets users pass a regular expression to keep chosen formula fonts unchanged.
- Provides bilingual comparison in its PDFMathTranslate-next project.
- Ultrafast mode installs as an optional extra: pip install 'pdf2zh[ultrafast]'.
- Ships a Windows ZIP package with assets such as fonts and models included.
Pdfmathtranslate cons
- Ultrafast mode suits only PDFs with native text; complex tables or formulas need normal mode.
- Ultrafast mode cannot be combined with precise mode, BabelDOC, server or GUI mode, or ONNX.
- Ultrafast mode skips font subsetting, so its output PDFs are larger.
- Without the assets package, fonts and models download at run time and may fail on network issues.
Frequently asked questions about Pdfmathtranslate
What does PDFMathTranslate do?
It translates PDF documents while preserving their formats, including mathematical formulas. The project describes its focus as PDF scientific paper translation.
Who is it for?
The project describes its focus as PDF scientific paper translation, so it is aimed at people who work with academic papers.
How can I install it?
It is published on PyPI and also ships as a Docker image and a Windows ZIP file. The optional ultrafast mode installs with pip install 'pdf2zh[ultrafast]'.
Which interfaces does it offer?
According to its PyPI listing, it provides a command-line tool, an interactive user interface and Docker support.
What is ultrafast mode?
Ultrafast mode uses native PDF text positions from pdf-inspector for heuristic layout, skipping ONNX layout and OCR. It suits PDFs that already contain native text, while normal mode is better for complex tables or formulas.
How does ultrafast mode handle pages without text?
In ultrafast mode, pages without native text are preserved without running OCR on them.
Which translation services can it use?
It works with large language models compatible with the OpenAI API, selected with -s service or -s service:model. Services not listed can be configured with environment variables using the OpenAI method.
How do I keep certain formulas unchanged?
The -f option takes a regular expression naming formula fonts to keep, and -c does the same for characters. The docs give an example pattern matching fonts such as CM, MS and Ital.
Does it produce bilingual output?
Its next-generation project, PDFMathTranslate-next, is described as providing bilingual comparison and is based on BabelDOC.
Does it need to download anything at runtime?
The version with assets includes fonts and models. The version without assets downloads resources when it runs, and that download may fail due to network issues.