Metadata-Version: 2.4
Name: free-doc-translate
Version: 0.1.1
Summary: Free document translation by OmniDoc: translate PDF, Word, PowerPoint and LaTeX into 38 languages with the layout kept. A companion tool of OmniDoc, the powerful AI document suite. Official site: https://omnidoc.top/
Project-URL: Homepage, https://omnidoc.top/
Project-URL: Homepage (China), https://omnidoc.cn/
Project-URL: Documentation, https://docs.omnidoc.top/
Project-URL: Download, https://download.omnidoc.top/
Keywords: free translation,free document translation,document translation,pdf translation,translate pdf,translate word,translate docx,translate pptx,latex translation,bilingual pdf,layout preserved,omnidoc,api client
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: omnidoc>=0.1.7

<p align="center">
  <a href="https://omnidoc.top/"><img src="https://omnidoc.top/icon-512.png" alt="OmniDoc" width="120"></a>
</p>

# free-doc-translate

Free document translation by [OmniDoc](https://omnidoc.top/), the powerful AI document suite. Translate PDF, Word, PowerPoint, LaTeX and more into 38 languages, and keep every table, formula and footnote where it was.

Official site: **https://omnidoc.top/**

免费文档翻译：PDF、Word、PPT、LaTeX 论文一键翻译成 38 种语言，表格、公式、脚注保持原版式，支持中英双语对照输出。由 OmniDoc 提供，官网 https://omnidoc.top/ （国内 https://omnidoc.cn/）。

## Before and after

Real output from OmniDoc free translation, not edited. Tables, numbers, formulas and figures stay where they were.

| Original (English) | OmniDoc translation (Chinese) |
|---|---|
| <img src="https://omnidoc.top/images/free/eia-steo-2026-11-p2-en.webp" alt="EIA Short-Term Energy Outlook, English original page" width="420"> | <img src="https://omnidoc.top/images/free/eia-steo-2026-11-p2-zh.webp" alt="EIA Short-Term Energy Outlook translated into Chinese by OmniDoc, layout kept" width="420"> |
| <img src="https://omnidoc.top/images/translate-demo/en/lf-graph2-1280.webp" alt="Physics paper page with figures and equations, English original" width="420"> | <img src="https://omnidoc.top/images/translate-demo/zh/lf-graph2-1280.webp" alt="Physics paper page translated into Chinese by OmniDoc, figures and equations kept" width="420"> |

Try it free in the browser: https://translate.omnidoc.top/

This package is a companion of the [`omnidoc`](https://pypi.org/project/omnidoc/) SDK. It installs `omnidoc` and exposes the same API.

For the current free translation allowance and credit pricing, see https://omnidoc.top/.

## Install

```bash
pip install free-doc-translate
```

Requires Python 3.9 or newer.

## Translate a file

Create an API key (it starts with `sk_`) in the API center at https://omnidoc.top/app/api-keys and put it in the environment:

```bash
export OMNIDOC_API_KEY="sk_your_key"
```

```python
from free_doc_translate import OmniDocClient

client = OmniDocClient()  # reads OMNIDOC_API_KEY
files = client.translate_file("paper.pdf", "en", output_dir="out", output_mode="bilingual")
print(files)
```

`output_mode="bilingual"` gives side-by-side bilingual files; leave it out for the translation only.

## More

- Every method, error type and webhook helper: https://pypi.org/project/omnidoc/ and https://docs.omnidoc.top/
- Free OmniDoc desktop app (offline editing and conversion): https://download.omnidoc.top/
