Directory Compare FCRS-1.0 About /llms.txt

PDFMathTranslate

$ pdf2zh Community Med Risk
PDFMathTranslate (OSS) · Design & Docs · AGPL-3.0 · macos / linux / windows · Reviewed:

PDFMathTranslate (pdf2zh) parses academic and technical PDFs to produce bilingual and monolingual translations while preserving multi-column layout, vector formulas, and tables. Supports Google, DeepL, OpenAI, and local Ollama backends via CLI, GUI (-i), Docker, and MCP.

FCRS-1.0 Score
76 /100
Good
Medium Confidence
Zero-Friction Install
pip install pdf2zh
CLI vs MCP Decision CLI Preferred vs MCP

Batch-translating PDFs via headless pdf2zh CLI flags (-p, -li, -lo, -s, -o) is cleaner than driving translation through MCP tool calls.

At a Glance

Command
$ pdf2zh
FCRS-1.0 Score
76/100 (Good)
Evidence Tier
Medium Confidence
CLI vs MCP
CLI Preferred vs MCP
Reviewed Date

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 17 / 25

Supports deterministic headless flags (-p, -li, -lo, -s, -t, -o) without prompts, though lacks a native --json summary flag.

  • Non-interactive CLI flags (-p, -li, -lo, -s, -o), no native --json output
Trust & Safety 19 / 25

Writes bilingual/monolingual PDFs locally, though external -s translation backends transmit document text over the network.

  • Local PDF output; external MT/LLM backends send document text off-machine
Setup & Portability 11 / 15

Installable via pip install pdf2zh or Docker, though initial runs fetch layout-detection models and font assets.

  • PyPI (pdf2zh) and Docker images; downloads model/font dependencies
Utility & Efficiency 13 / 15

Best-in-class preservation of LaTeX math, multi-column layouts, and figures in academic PDFs.

  • Layout- and formula-preserving bilingual PDF rendering
Maintenance & Lineage 8 / 10

EMNLP 2025 demo and widely adopted OSS project (PDFMathTranslate/PDFMathTranslate, 38.9k+ stars) under AGPL-3.0.

  • PDFMathTranslate/PDFMathTranslate repository
Docs & Verifiability 8 / 10

Well-documented CLI options, service configs, and Zotero/Docker workflows in README and pdf2zh.com.

  • Docs at pdf2zh.com and GitHub README

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key Config File
Credential Storage

Reads translation service API keys (OPENAI_API_KEY, DEEPL_AUTH_KEY, etc.) from environment variables or local config; supports local Ollama with no cloud keys.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

AGPL-3.0 open-source CLI; translation costs depend on whether you pick free/local Ollama or paid LLM/DeepL APIs.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# pdf2zh Agent Rules
- Never pass `-i` (GUI mode) in headless agent shells.
- Scope large papers first with `-p 1-3` and explicit `-o <dir>` output directories.
- Do not send confidential PDFs to external translation backends (`-s google|openai`) without approval; prefer local Ollama when sensitive.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect CLI flags and supported translation services
pdf2zh --help

Displays language codes, backend service options (-s), page filters (-p), and output flags.

Controlled Writes & Previews

Translate selected PDF pages headlessly
pdf2zh -p 1-3 -li en -lo zh -s openai -t 4 -o ./out paper.pdf

Translates pages 1–3 from English to Chinese using 4 threads while preserving formulas and writing to ./out.

Strengths for Agents

  • + Preserves complex LaTeX equations, figures, and academic multi-column layouts.
  • + Flexible backend selection (-s) spanning OpenAI, DeepL, Google, and offline Ollama.
  • + Partial-page translation (-p) and multi-threading (-t) speed up iterative testing.

Caveats & Pitfalls

  • ! Lacks a native --json run summary output; agents must inspect exit code and -o output files.
  • ! First run downloads layout-analysis weights and may require --skip-subset-fonts on tricky PDFs.
  • ! AGPL-3.0 license requires copyleft compliance if offered as a modified network service.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI

Related CLIs in Design & Docs

View category hub →
mado 75/100
$ mado

A fast Markdown linter written in Rust

$ presenterm

A markdown terminal slideshow tool

PlantUML 77/100
$ plantuml

Mature Java-based UML and sequence diagram compiler (`plantuml`) with `-checkonly` syntax verification.

tex-fmt 75/100
$ tex-fmt

Extremely fast LaTeX formatter written in Rust

oasdiff 95/100
$ oasdiff

OpenAPI diff & breaking-change detector: `oasdiff breaking base.yaml rev.yaml` and `oasdiff changelog`.

Pandoc 94/100
$ pandoc

Universal document converter translating cleanly across Markdown, HTML, LaTeX, DOCX, EPUB, and AST JSON.