Skip to content
documentflare
Tutorials

Translate PDF text without the cloud: compatibility and layout

Translate a PDF with AI without uploading it, via the Translator API in Chrome or Edge 138+. Plain-text output page by page, unchanged PDF, language pairs and limits.

Table of contents

A contract in German, a technical manual in Portuguese, a report in English: you often need to understand a PDF written in a foreign language without being able — or willing — to hand it over to an online translation service. Cloud services require sending the entire document, which is unacceptable for a confidential file or one covered by a non-disclosure agreement. The local approach resolves this dilemma: the translation model lives in your browser and the document never leaves your device.

The browser’s Translator API

Document Flare’s Translate a PDF with AI tool relies on the Translator API built into Chrome and Edge from version 138. Unlike a remote service, the browser itself provides the models: a separate model per language pair, downloaded on demand on first use then kept in cache. Inference then runs entirely on your machine.

The selector offers seven languages — French, English, Spanish, Arabic, German, Italian and Portuguese — but the actual availability of a source→target pair is checked by the API before processing: if your browser doesn’t provide the matching model, the tool says so instead of failing silently.

The source language can be detected automatically via the LanguageDetector API when it exists in the browser; otherwise, you choose it explicitly. Detection runs on a sample of up to 5,000 characters, with a confidence threshold below which the tool refuses to guess.

Step by step: translate a PDF

  1. Open the Translate a PDF with AI tool.
  2. Drop your PDF. A single file, up to 50 MiB and 1,000 pages.
  3. Choose the source language. “Automatic detection” if your browser offers it, otherwise the document’s explicit language.
  4. Choose the target language. The panel then checks the pair’s availability; if the model isn’t present yet, a download starts when you launch.
  5. Start the translation. Text is extracted page by page with pdf.js, split into chunks of about 15,000 characters, then translated chunk by chunk. A progress indicator shows the current step.
  6. Retrieve the result. The translated text appears in the panel and downloads as a .txt file, named after your document and the target language.

What the output produces: plain text, not a translated PDF

An essential honesty point: you do not get a translated PDF. The result is plain text organized page by page, each section preceded by a “— Page n —” marker to keep your bearings in the source document. Pages without text keep their marker, empty.

The layout is entirely lost: columns, tables, images, footnotes and styles disappear. Only the flow of text survives, in pdf.js’s extraction order — which can be surprising on multi-column layouts. The source PDF is never modified.

It’s the right tool to understand a document or extract reusable content from it, not to produce a translated deliverable ready for distribution. For a structured text version of the document in its original language, PDF to Markdown remains more suitable.

Honest limits

  • Chrome or Edge 138+ only. The Translator API is absent from Firefox, Safari and most Chromium-derived browsers. Even on a supported browser, its availability depends on your region, your flags and corporate policies.
  • Limited language pairs. Seven languages in the selector, and the browser still has to provide the model for the pair you want. Exotic combinations aren’t covered.
  • Machine translation quality. The embedded model is compact: the translation is good enough to understand a text, but remains below the large specialized services on legal or highly technical content. Human proofreading remains essential for any official use.
  • Text layer required. A scanned PDF with no selectable text returns an error: run a local OCR first.
  • First download. The language pair model is downloaded on first use; offline and without a prior cache, translation is unavailable.

Verify the document stays local

The “no cloud” promise can be tested in five minutes: open the developer tools (F12), go to the Network tab, drop your PDF and run the translation. No POST or PUT request carries the document — only the page, its resources and the one-off model download go through. The full protocol is detailed in our network traffic test (article available in French) and in PDF privacy: what local processing really protects.

Going further

Once the text is translated, two natural follow-ups: summarize the PDF with local AI to condense its content, or semantic search to query the document by meaning rather than keywords — still with no network upload.