Skip to main content

Latex PDF Translator

Project description

PDFMathTranslate

PDF scientific paper translation and bilingual comparison based on font rules and deep learning, preserving formula and figure layout.

image

image

Installation

pip install pdf2zh

Usage

Execute the translation command in the command line to generate the Chinese 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

Use regex to specify formula fonts and characters that need to be preserved

Hint: Starting from \ufb00 is English style ligature.

pdf2zh BDA3.pdf -f "(CM[^RT].*|MS.*|XY.*|MT.*|BL.*|.*0700|.*0500|.*Italic)" -c "(\(|\||\)|\+|=|\d|[\u0080-\ufaff])"

Acknowledgement

Document merging: PyMuPDF

Document parsing: Pdfminer.six

Multi-threaded translation: MathTranslate

Layout parsing: LayoutParser

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.3.0.tar.gz (129.9 kB view details)

Uploaded Source

Built Distribution

pdf2zh-1.3.0-py3-none-any.whl (138.4 kB view details)

Uploaded Python 3

File details

Details for the file pdf2zh-1.3.0.tar.gz.

File metadata

  • Download URL: pdf2zh-1.3.0.tar.gz
  • Upload date:
  • Size: 129.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pdf2zh-1.3.0.tar.gz
Algorithm Hash digest
SHA256 4d346079a8d541597f39aa5b066df18287864646c3c689e801839810f6632d40
MD5 706351f70ffc1f190b05cb07411cab74
BLAKE2b-256 3756c4b9c045f2e46c823abe9f8b6850e21f4a43317d54c60cb49ee646e9d3e6

See more details on using hashes here.

Provenance

File details

Details for the file pdf2zh-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: pdf2zh-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 138.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pdf2zh-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b6566c3538ea81e98ac6b5c5b24911cbbc34d425e3d1dc5f546beaf9b81089a
MD5 1d8cb7eec214b9ed07021e506d54d42e
BLAKE2b-256 f8f0fc23656256c0dc6079c0e6e0140c20c41292225d11f1bbeac65e6138b342

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page