Skip to main content

Utility to translate PDF files using Google Cloud Translate API

Project description

PDF Translation API

Easily translate PDF documents using the Google Cloud Translation API.

PyPI - Version PyPI - Python Version


Installation and Usage

pip install pdf-translation-api

Make sure to set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your service account key file. Check the Google Cloud Translation API documentation for more information.

from pdf_translation_api import translate_document

output_path = translate_document(
    path="path/to/your/document.pdf",
    target_lang="nl",
)
print(output_path)
>>> path/to/your/document.nl.pdf

[!WARNING]
Google Cloud Translation API charges for usage. Make sure to check the pricing before using this library.

Upcoming Features

  • Support for files with more than 20 pages

License

pdf-translation-api is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdf_translation_api-0.1.3.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

pdf_translation_api-0.1.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file pdf_translation_api-0.1.3.tar.gz.

File metadata

  • Download URL: pdf_translation_api-0.1.3.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for pdf_translation_api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 515d33733ca1b3dd1466bc1cd8cdab6ab023e3334f66052132110adc346d46dc
MD5 a3dc3c9a3466fd44ceef28afbf77a793
BLAKE2b-256 1b2958c91e12aae97567c2d661d4f3f33095770854d4dc826fc92d50ec8524bd

See more details on using hashes here.

File details

Details for the file pdf_translation_api-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_translation_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 421ccc905656b08980a0b6bdee05500fc372a9768bbc9a24a5c6320371eeea79
MD5 f78057016a4e6952a4c933e2526caa7b
BLAKE2b-256 c76a187674ce6c45a24045e412268815a876dfa50a21a91e0ca12698ed566416

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