RetainPDF wxyhgk
Install RetainPDF with WinGet
winget install --id=wxyhgk.RetainPDF -e RetainPDF is currently the only open-source project built for layout-preserving translation of image-based and scanned PDFs, with translation and typesetting quality that matches or even surpasses comparable commercial products. Its in-house typography algorithm restores complex formulas and multi-column paper layouts. Scanned PDF translation, PDF structure optimization, code protection, custom translation strategies, and an open API are all included. The translation system is also built in-house, with dedicated handling for cross-column and cross-page passages, broken sentences, and continued paragraphs. It restores complete semantic units before translation instead of translating isolated OCR boxes and losing context. Inline formulas are RetainPDF's defining advantage: formulas, surrounding text, and inline layout remain stable after translation—something other open-source PDF translators do not currently achieve. The code, API, and deployment stack are fully open, with support for self-hosting and further development. Core capability comparison: | Project | Scanned PDFs | Complex inline formulas | Protect code from translation | Table control | Custom translation strategy | Layout preservation | PDF size optimization | API automation | | ---------------- | ------------ | ----------------------- | ----------------------------- | ------------- | --------------------------- | ------------------- | ----------------------- | -------------- | | PDFMathTranslate | ❌ | ❌ | ❌ | Limited | Limited | Average | Average | ✅ | | PolyglotPDF | ❌ | ❌ | ❌ | Limited | Limited | Average | Average | ✅ | | Doc2X | ✅ | ✅ | ❌ | Moderate | Limited | Strong | Limited | ❌ Not public | | RetainPDF | ✅ | ✅ Strong preservation | ✅ | ✅ Optional | ✅ Rule-based | Strong | ✅ Continuously improved | ✅ |