Latex PDF Translator
Project description
PDFMathTranslate
PDF scientific paper translation and bilingual comparison.
-
Retain formulas and charts.
-
Preserve table of contents.
-
Support multiple translation services.
Installation
pip install pdf2zh
Usage
Execute 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.
Translate the entire document
pdf2zh example.pdf
Translate part of the document
pdf2zh example.pdf -p 1-3,5
Translate with the specified language
See Languages Codes.
pdf2zh example.pdf -li en -lo ja
Translate with Ollama
pdf2zh example.pdf -s gemma2
Use regex to specify formula fonts and characters that need to be preserved
pdf2zh BDA3.pdf -f "(CM[^RT].*|MS.*|XY.*|MT.*|BL.*|.*0700|.*0500|.*Italic)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"
Preview
Acknowledgement
Document merging: PyMuPDF
Document parsing: Pdfminer.six
Document extraction: MinerU
Multi-threaded translation: MathTranslate
Layout parsing: DocLayout-YOLO
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdf2zh-1.6.4.tar.gz
(142.9 kB
view details)
Built Distribution
pdf2zh-1.6.4-py3-none-any.whl
(151.3 kB
view details)
File details
Details for the file pdf2zh-1.6.4.tar.gz
.
File metadata
- Download URL: pdf2zh-1.6.4.tar.gz
- Upload date:
- Size: 142.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9a4e61ba5a709ffb76f18d5aaa2f7d0e33c1d556615b736764c9006a9db68c |
|
MD5 | 312bd500cef175c784ff26f55dad863a |
|
BLAKE2b-256 | 7d077c98338eb62c62f63dc7b165b0cb7d9c6f2086347e8467c01c1e7ab6bce5 |
File details
Details for the file pdf2zh-1.6.4-py3-none-any.whl
.
File metadata
- Download URL: pdf2zh-1.6.4-py3-none-any.whl
- Upload date:
- Size: 151.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c940775685e8da75e04bf8a1b1f7f38072954ccd5431ccc20dc5d03dc5bec21 |
|
MD5 | 076f9e72ed17caf7097ac1dc8035396b |
|
BLAKE2b-256 | 58aeba8c4b6cf0f13c6192884664337acfaab934532088ec8482f746599b867a |