Metadata-Version: 2.1
Name: pdf-translation-api
Version: 0.1.3
Summary: Utility to translate PDF files using Google Cloud Translate API
Project-URL: Documentation, https://github.com/abyesilyurt/pdf-translation-api#readme
Project-URL: Issues, https://github.com/abyesilyurt/pdf-translation-api/issues
Project-URL: Source, https://github.com/abyesilyurt/pdf-translation-api
Author-email: Aziz Berkay Yesilyurt <abyesilyurt@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: api,cloud,google,pdf,translation
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.8
Requires-Dist: google-cloud-translate
Description-Content-Type: text/markdown

# PDF Translation API

Easily translate PDF documents using the Google Cloud Translation API.

[![PyPI - Version](https://img.shields.io/pypi/v/pdf-translation-api.svg)](https://pypi.org/project/pdf-translation-api)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pdf-translation-api.svg)](https://pypi.org/project/pdf-translation-api)

---

## Installation and Usage

```console
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](https://cloud.google.com/translate/docs/setup) for more information.

```python
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](https://cloud.google.com/translate/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](https://spdx.org/licenses/MIT.html) license.
