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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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