AI Personal Learning
and practical guidance
Ali-painted frog

PDFMathTranslate: AI translation tool that preserves the full typography of PDFs

General Introduction

PDFMathTranslate is an open source tool that focuses on translating scientific papers, and is able to translate PDF documents in their entirety and generate bilingual versions. It uses AI technology to retain the full layout of the original document , including formulas , charts , tables of contents and notes , support Google, DeepL, Ollama, OpenAI and other translation services. The tool offers command line (CLI), graphical interface (GUI), Docker deployment, and Zotero plugin to meet the needs of researchers for rapid translation and reading. As of March 2025, the project has received over 17,000 stars on GitHub, has an active community, and continues to be updated with new support for native models, non-PDF/A files, and BabelDOC backends.

PDFMathTranslate: Translation of academic papers, preserving typographic formatting, supporting multiple translation services-1


 

PDFMathTranslate: Translation of academic papers, preserving typographic formatting, supporting multiple translation services-1

Online experience: https://pdf2zh.com/

 

Function List

  • Full translation and bilingualism: Translate PDF documents into the target language, generating both monolingual translations and bilingual cross-references.
  • Retain original typography: Ensure consistent formatting of formulas, charts, tables of contents, and notes, and support for complex typesetting such as LaTeX.
  • Multi-language support: Translation from multiple source languages such as English to multiple target languages such as Chinese.
  • Multi-Translation Services: Integration with services such as Google, DeepL, OpenAI, Ollama, and support for Xinference Local models.
  • Multi-platform use: Provides CLI tools, GUI interface, Docker containers and Zotero plugins.
  • Online Experience:: Try out core functionality without installation through public services.
  • Advanced Customization: Support for advanced options such as partial translation, multi-threaded processing, and customized output directories.

 

Using Help

Installation process

PDFMathTranslate provides multiple installation methods for different scenarios. Below are the detailed steps:

1. UV installation (command line recommended)

  • prerequisitesPython 3.10 to 3.12 should be installed on your system.
  • move:
    1. Install the UV tool:
      pip install uv
      
    2. Install PDFMathTranslate:
      uv tool install --python 3.12 pdf2zh
      
    3. Verify: Run pdf2zh --versionIf the version number is displayed, it is successful.
  • Network troubleshooting: If the model cannot be downloaded wybxc/DocLayout-YOLO-DocStructBench-onnx, set the environment variables:
    • CMD. set HF_ENDPOINT=https://hf-mirror.com
    • PowerShell. $env:HF_ENDPOINT = "https://hf-mirror.com"

2. Windows executable (no programming environment required)

  • move:
    1. Visit the GitHub release page (https://github.com/Byaidu/PDFMathTranslate/releases).
    2. Download the latest pdf2zh-version-win64.zipThe
    3. Unzip and double-click pdf2zh.exe Running.
  • take note of: If it does not work, you need to install the VC++ runtime library (https://aka.ms/vs/17/release/vc_redist.x64.exe).

3. Graphical user interface (GUI)

  • prerequisites: Python 3.10 to 3.12.
  • move:
    1. Install the package:
      pip install pdf2zh
      
    2. Start the GUI:
      pdf2zh -i
      
    3. browser access http://localhost:7860/(If not turned on automatically, enter manually).
  • Network troubleshooting: Same as UV mounting method.

4. Docker deployment

  • prerequisites: Docker is installed (https://www.docker.com/).
  • move:
    1. Pull the image and run it:
      docker pull byaidu/pdf2zh
      docker run -d -p 7860:7860 byaidu/pdf2zh
      
    2. browser access http://localhost:7860/The
  • Alternative Programs: If Docker Hub is not available, use GitHub mirrors:
docker pull ghcr.io/byaidu/pdfmathtranslate
docker run -d -p 7860:7860 ghcr.io/byaidu/pdfmathtranslate

5. Zotero plug-in

  • move:
  1. Visit https://github.com/guaguastandup/zotero-pdf2zh to download the plugin.
  2. Install and configure translation parameters in Zotero.

workflow

1. Command-line translation

  • basic operation:
  1. Prepare PDF files (e.g. paper.pdf).
  2. Run command:
    pdf2zh paper.pdf
    
  3. Output: Generate paper-mono.pdf(translation) and paper-dual.pdf(bilingual), save to current directory.
  • Advanced Options:
  • Specify the language:-li en -lo zh(English to Chinese).
  • Select Service:-s deepl(Use DeepL).
  • Partial translation:-p 1-5(pages 1-5).
  • Output Path:-o . /outputThe
    Example:
pdf2zh paper.pdf -li en -lo zh -s openai -o . /translated
  • compatibility:: Non-PDF/A files plus --compatible Parameters:
pdf2zh paper.pdf --compatible

2. Use of the GUI interface

  • procedure:
  1. Start the GUI (pdf2zh -i).
  2. Upload a file: Click "Select File" to upload a local PDF, or enter an online link (e.g., "Upload PDF"). http://arxiv.org/paper.pdf).
  3. Configuration parameters:
    • Source Language: Select "English".
    • Target language: Select "Chinese (Simplified)".
    • Translation service: choose "Google" or other.
  4. Click "Translate" and wait for it to finish.
  5. Download: Get a monolingual or bilingual PDF file.
  • Featured Functions: Support for online link translation and intuitive operation.

3. Docker Online Services

  • procedure:
  1. Run the container and then access the http://localhost:7860/The
  2. Same as GUI operation, upload files or links, set parameters and then translate.
  3. Share function: add --share parameter to generate a public link:
    pdf2zh --i --share
    

4. Zotero plug-in usage

  • procedure:
  1. Select the PDF document in Zotero.
  2. Click on the plugin icon to set the language and services.
  3. The result is automatically appended to the entry after translation.

Featured Functions

  • Preserve typography: Use DocLayout-YOLO Model parsing layout to ensure accurate placement of formulas and charts.
  • Online Service Experience: Visit https://pdf2zh.com/ or https://app.immersivetranslate.com/babel-doc/ (1,000 free pages per month) to use without installation.
  • Multi-threaded acceleration: Use -t 4 Enable 4 threads for large files:
pdf2zh large_paper.pdf -t 4

caveat

  • Resource constraints: The online demo has limited computing resources, so please do not abuse them.
  • Update Log: March 2025 Added BabelDOC WebUI support (experimental) to enhance the translation experience.
  • Community Feedback: Submit suggestions via GitHub Issues (https://github.com/Byaidu/PDFMathTranslate/issues) or the Telegram group (https://t.me/+Z9_SgnxmsmA5NzBl).

 

PDFMathTranslate Unofficial Integration Package

https://pan.quark.cn/s/e9e912c62c3a#/list/share

https://github.com/aidayang/PDFMathTranslate-OneClick

CDN1
May not be reproduced without permission:Chief AI Sharing Circle " PDFMathTranslate: AI translation tool that preserves the full typography of PDFs

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish