PDF scientific paper translation and bilingual comparison.
-
📊 Retain formulas and charts.
-
📄 Preserve table of contents.
-
🌐 Support multiple translation services.
pip install pdf2zhExecute the translation command in the command line to generate the translated document example-zh.pdf and the bilingual document example-dual.pdf in the current directory.
pdf2zh example.pdfpdf2zh example.pdf -p 1-3,5See Languages Codes.
pdf2zh example.pdf -li en -lo jaSee Ollama.
pdf2zh example.pdf -s gemma2pdf2zh BDA3.pdf -f "(CM[^RT].*|MS.*|XY.*|MT.*|BL.*|.*0700|.*0500|.*Italic)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"Document merging: PyMuPDF
Document parsing: Pdfminer.six
Document extraction: MinerU
Multi-threaded translation: MathTranslate
Layout parsing: DocLayout-YOLO


