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 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

pdf2zh example.pdf -li en -lo ja

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf2zh-1.3.9-py3-none-any.whl (139.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdf2zh-1.3.9.tar.gz
  • Upload date:
  • Size: 130.7 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.9.tar.gz
Algorithm Hash digest
SHA256 fb9f7ea9629776784e407a14711bcf73a11be90f4222f4b4a3d68ab00c4eb77f
MD5 30cbfdbe8a2533482a2876208b99bf6a
BLAKE2b-256 fbc5d4bc4c217914dedf85bb6bd760c7da95690e6ed357c81bff75ef40323c5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdf2zh-1.3.9-py3-none-any.whl
  • Upload date:
  • Size: 139.1 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a99097747d41c04d02b9cb0eb71a9004f31a550c1f7a99efe13570297ebb1bf6
MD5 4a6705996e12978a234dc1e53eeb0736
BLAKE2b-256 86fad3128e723198d8fa6ceb1fa92f249ec15a409dd458e9a1d4500f7e2754c1

See more details on using hashes here.

Supported by

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