wxyhgk/retain-pdf
在保留版面、公式与结构的前提下进行 PDF 翻译,适用于科研与技术文档
What it solves
RetainPDF is a translation tool designed to translate PDF documents while strictly preserving the original layout. It specifically addresses common failures in PDF translation, such as handling scanned/image-based PDFs, rendering complex inline mathematical formulas, and preventing the mistranslation of code blocks.
How it works
The project uses a full-stack architecture that decouples the frontend, backend, and processing pipeline. It integrates OCR for normalization of scanned documents, a translation engine, and a rendering system to backfill translated text into the original layout. The backend is powered by a Rust API that manages tasks and providers, while a Python pipeline handles the heavy lifting of OCR, translation, and PDF processing.
Who it’s for
It is ideal for researchers, students, and professionals who need to translate academic papers (like SCI papers), technical books, and scanned documents without losing the structural integrity or mathematical notation of the original file.
Highlights
- Comprehensive PDF Support: Handles both digital and scanned/image-based PDFs.
- Layout Preservation: Strong focus on maintaining the original formatting, font sizes, and overall structure.
- Technical Accuracy: Specifically optimized to protect inline formulas and code blocks from being corrupted during translation.
- Flexible Deployment: Available as a desktop application (Windows, macOS, Linux) or via Docker for team/LAN deployment.
- Customizable: Supports configurable translation strategies and rule-based settings.
Related
- Project
- Project
- Project
- Project
- Project